diff --git a/README.md b/README.md index 7d5c878..bec52e7 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,6 @@ Change logs are auto-generated with commitizen. | [region](#input\_region) | AWS config region | `string` | `""` | no | | [region\_map](#input\_region\_map) | AWS region map | `map(string)` |
{
"east": "us-gov-east-1",
"west": "us-gov-west-1"
}
| no | | [route53\_endpoints](#input\_route53\_endpoints) | Map of target route53 endpoints (for inbound) central VPCs | `map(map(string))` |
{
"route53_main": {
"account_id": "269244441389",
"alias": "lab-gov-network-nonprod",
"us-gov-east-1": "vpc-070595c5b133243dd",
"us-gov-west-1": "vpc-08b7b4db6a5ddf9c1"
}
}
| no | -| [shared\_vpc\_label](#input\_shared\_vpc\_label) | Label to use for shared VPC for flowlogs and other things | `string` | `null` | no | | [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 | diff --git a/main.tf b/main.tf index 785e193..5f868f2 100644 --- a/main.tf +++ b/main.tf @@ -48,8 +48,9 @@ resource "aws_route53_zone" "cluster_domain" { # east region #--- module "route53_cluster_domain_east" { + depends_on = [aws_route53_zone.cluster_domain] - count = local.region == "us-gov-east-1" && !(var.shared_vpc_label == null || var.shared_vpc_label == "") ? 1 : 0 + count = local.region == "us-gov-east-1" && local.is_shared_vpc ? 1 : 0 providers = { aws.self = aws.self aws.peer = aws.route53_main_east @@ -67,8 +68,9 @@ module "route53_cluster_domain_east" { # west region #------------------------------------------------- module "route53_cluster_domain_west" { + depends_on = [aws_route53_zone.cluster_domain] - count = local.region == "us-gov-west-1" && !(var.shared_vpc_label == null || var.shared_vpc_label == "") ? 1 : 0 + count = local.region == "us-gov-west-1" && local.is_shared_vpc ? 1 : 0 providers = { aws.self = aws.self aws.peer = aws.route53_main_west diff --git a/variables.tf b/variables.tf index 72ab6a6..2336ee9 100644 --- a/variables.tf +++ b/variables.tf @@ -47,12 +47,6 @@ variable "os_username" { # DNS variables ################################################################### -variable "shared_vpc_label" { - description = "Label to use for shared VPC for flowlogs and other things" - type = string - default = null -} - variable "region_map" { description = "AWS region map" type = map(string)