module "zone" { # count = local.route53_zone == "" ? 0 : 1 source = "terraform-aws-modules/route53/aws//modules/zones" version = "~> 2.0" zones = { "${local.domain_name}" = { comment = "${local.domain_name}" } } } module "records" { # count = local.route53_zone == "" ? 0 : 1 source = "terraform-aws-modules/route53/aws//modules/records" version = "~> 2.0" #zone_name = keys(module.zone.0.route53_zone_zone_id)[0] zone_name = keys(module.zone.route53_zone_zone_id)[0] records = [ { name = "" type = "A" ttl = 600 # 10 minutes records = [ aws_eip.social.public_ip ] }, ] depends_on = [ module.zone ] }