diff --git a/README.md b/README.md index bec52e7..d922c5a 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ Change logs are auto-generated with commitizen. | [tags](#input\_tags) | AWS Tags to apply to appropriate resources | `map(string)` | `{}` | no | | [vpc\_domain\_name](#input\_vpc\_domain\_name) | The DNS domain name of the vpc the cluster is in. | `string` | n/a | yes | | [vpc\_name](#input\_vpc\_name) | Define the VPC name that will be used by this cluster | `string` | n/a | yes | +| [zone\_ids](#input\_zone\_ids) | zone ids to mock module call | `list(string)` |
[| no | ## Outputs diff --git a/main.tf b/main.tf index d93fe30..1ab1f06 100644 --- a/main.tf +++ b/main.tf @@ -12,6 +12,7 @@ locals { region = var.region is_shared_vpc = data.aws_vpc.eks_vpc.owner_id != data.aws_caller_identity.current.account_id vpc_domain_name = var.vpc_domain_name + zone_ids = concat(var.zone_ids, aws_route53_zone.cluster_domain.id) } #------------------------------------------------- @@ -57,7 +58,7 @@ module "route53_cluster_domain_east" { source = "git@github.e.it.census.gov:terraform-modules/aws-vpc-setup.git//route53-zone-association/zone?ref=tf-upgrade" region = "us-gov-east-1" vpc_id = data.aws_vpc.eks_vpc.id - zone_ids = [aws_route53_zone.cluster_domain.zone_id] + zone_ids = [local.zone_ids] tags = var.tags } @@ -76,7 +77,7 @@ module "route53_cluster_domain_west" { source = "git@github.e.it.census.gov:terraform-modules/aws-vpc-setup.git//route53-zone-association/zone?ref=tf-upgrade" region = "us-gov-west-1" vpc_id = data.aws_vpc.eks_vpc.id - zone_ids = [aws_route53_zone.cluster_domain.zone_id] + zone_ids = [local.zone_ids] tags = var.tags } diff --git a/variables.tf b/variables.tf index 2336ee9..eb0613f 100644 --- a/variables.tf +++ b/variables.tf @@ -65,3 +65,9 @@ variable "route53_endpoints" { } } } + +variable "zone_ids" { + description = "zone ids to mock module call" + type = list(string) + default = [""] +}
""
]