Skip to content

Commit

Permalink
Fix image URL, make subdomain be constructed from region
Browse files Browse the repository at this point in the history
  • Loading branch information
klejejs committed Sep 26, 2024
1 parent 015d7d4 commit 17afaa1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions stun_server/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module "us_east_1" {

region = "us-east-1"
domain_name = var.domain_name
subdomain = "stun-us"
subdomain = "stun"
image_tag = var.image_tag
}

Expand All @@ -26,7 +26,7 @@ module "eu_central_1" {

region = "eu-central-1"
domain_name = var.domain_name
subdomain = "stun-eu"
subdomain = "stun"
image_tag = var.image_tag
}

Expand All @@ -35,6 +35,6 @@ module "ap_southeast_1" {

region = "ap-southeast-1"
domain_name = var.domain_name
subdomain = "stun-ap"
subdomain = "stun"
image_tag = var.image_tag
}
2 changes: 1 addition & 1 deletion stun_server/region/dns.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ data "cloudflare_zone" "dns_zone" {

resource "cloudflare_record" "instance_dns" {
zone_id = data.cloudflare_zone.dns_zone.id
name = var.subdomain
name = join("-", [var.subdomain, data.aws_region.current.name])
content = module.stun_server.aws_network_interface.stun_server_interface.association[0].public_ip
type = "A"
proxied = true
Expand Down
2 changes: 1 addition & 1 deletion stun_server/region/module.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module "stun_server" {
source = "../../.modules/service"

service_name = local.service_name
container_image = "ghcr.io/home-assistant/stun-server"
container_image = "ghcr.io/home-assistant/stun"
container_version = var.image_tag
region = aws_region.current.name
ecs_cpu = 2048
Expand Down

0 comments on commit 17afaa1

Please sign in to comment.