Commit be85f8ab authored by Leslie-Alexandre DENIS's avatar Leslie-Alexandre DENIS Committed by GitHub

fix: use tomap() instead of type declaration object() (#14)

parent fad80868
......@@ -65,9 +65,14 @@ module "records" {
},
]
depends_on = [module.zones] #, module.cloudfront, module.s3_bucket]
depends_on = [module.zones]
}
module "disabled_records" {
source = "../../modules/records"
create = false
}
#########
# Extras - should be created in advance
......
......@@ -12,8 +12,7 @@ data "aws_route53_zone" "this" {
}
resource "aws_route53_record" "this" {
for_each = var.create && (var.zone_id != null || var.zone_name != null) ? local.recordsets : object({})
# for_each = local.recordsets
for_each = var.create && (var.zone_id != null || var.zone_name != null) ? local.recordsets : tomap({})
zone_id = data.aws_route53_zone.this[0].zone_id
......@@ -26,7 +25,7 @@ resource "aws_route53_record" "this" {
for_each = length(keys(lookup(each.value, "alias", {}))) == 0 ? [] : [true]
content {
name = each.value.alias.name # module.api_gateway.this_apigatewayv2_domain_name_configuration.0.target_domain_name
name = each.value.alias.name
zone_id = each.value.alias.zone_id
evaluate_target_health = lookup(each.value.alias, "evaluate_target_health", false)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment