Skip to content

Commit 97fd73f

Browse files
authored
Fixes DNS prepending var.name to local.cluster_dns_name (cloudposse#88)
## what * DNS was changing when it shouldn't have been, it was the value of: ``` ${var.name}-${local.cluster_dns_name} ``` I think this may have changed in https://github.com/cloudposse/terraform-aws-route53-cluster-hostname/releases/tag/0.6.0 This changes the parameter to `dns_name` and upgrades the version to get a stable DNS record ## why * Fix broken DNS
1 parent f3eafd2 commit 97fd73f

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

main.tf

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -247,23 +247,23 @@ locals {
247247
}
248248

249249
module "dns_master" {
250-
source = "git::https://github.com/cloudposse/terraform-aws-route53-cluster-hostname.git?ref=tags/0.6.0"
250+
source = "git::https://github.com/cloudposse/terraform-aws-route53-cluster-hostname.git?ref=tags/0.7.0"
251251

252-
enabled = module.this.enabled && length(var.zone_id) > 0 ? true : false
253-
name = local.cluster_dns_name
254-
zone_id = var.zone_id
255-
records = coalescelist(aws_rds_cluster.primary.*.endpoint, aws_rds_cluster.secondary.*.endpoint, [""])
252+
enabled = module.this.enabled && length(var.zone_id) > 0 ? true : false
253+
dns_name = local.cluster_dns_name
254+
zone_id = var.zone_id
255+
records = coalescelist(aws_rds_cluster.primary.*.endpoint, aws_rds_cluster.secondary.*.endpoint, [""])
256256

257257
context = module.this.context
258258
}
259259

260260
module "dns_replicas" {
261-
source = "git::https://github.com/cloudposse/terraform-aws-route53-cluster-hostname.git?ref=tags/0.6.0"
261+
source = "git::https://github.com/cloudposse/terraform-aws-route53-cluster-hostname.git?ref=tags/0.7.0"
262262

263-
enabled = module.this.enabled && length(var.zone_id) > 0 && var.engine_mode != "serverless" ? true : false
264-
name = local.reader_dns_name
265-
zone_id = var.zone_id
266-
records = coalescelist(aws_rds_cluster.primary.*.reader_endpoint, aws_rds_cluster.secondary.*.reader_endpoint, [""])
263+
enabled = module.this.enabled && length(var.zone_id) > 0 && var.engine_mode != "serverless" ? true : false
264+
dns_name = local.reader_dns_name
265+
zone_id = var.zone_id
266+
records = coalescelist(aws_rds_cluster.primary.*.reader_endpoint, aws_rds_cluster.secondary.*.reader_endpoint, [""])
267267

268268
context = module.this.context
269269
}

0 commit comments

Comments
 (0)