Commit be1d1f8c authored by chas0amx's avatar chas0amx Committed by GitHub

feat: Allow zones with the same domain name (eg, public and private) (#55)

parent ac0737b9
......@@ -21,7 +21,9 @@ module "zones" {
}
"private-vpc.terraform-aws-modules-example.com" = {
comment = "private-vpc.terraform-aws-modules-example.com"
# in case than private and public zones with the same domain name
domain_name = "terraform-aws-modules-example.com"
comment = "private-vpc.terraform-aws-modules-example.com"
vpc = [
{
vpc_id = module.vpc.vpc_id
......
resource "aws_route53_zone" "this" {
for_each = var.create ? var.zones : tomap({})
name = each.key
name = lookup(each.value, "domain_name", each.key)
comment = lookup(each.value, "comment", null)
force_destroy = lookup(each.value, "force_destroy", 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