Skip to content

Commit

Permalink
remove condition for network-prod and do2-gov associations; they are …
Browse files Browse the repository at this point in the history
…always done (#19)
  • Loading branch information
badra001 committed Dec 15, 2025
1 parent 5e7ed38 commit 5907ae8
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,13 @@ resource "aws_route53_zone_association" "cluster_zone_west" {
# east region
#---
resource "aws_route53_vpc_association_authorization" "central_zone_east" {
count = local.region == "us-gov-east-1" && local.is_shared_vpc ? 0 : 1

provider = aws.self
vpc_id = var.route53_endpoints.route53_main["us-gov-east-1"]
vpc_region = var.region_map["east"]
zone_id = aws_route53_zone.cluster_domain.zone_id
}

resource "aws_route53_zone_association" "central_zone_east" {
count = local.region == "us-gov-east-1" && local.is_shared_vpc ? 0 : 1

provider = aws.route53_main
vpc_id = var.route53_endpoints.route53_main["us-gov-east-1"]
vpc_region = var.region_map["east"]
Expand All @@ -115,17 +111,13 @@ resource "aws_route53_zone_association" "central_zone_east" {
# west region
#-------------------------------------------------
resource "aws_route53_vpc_association_authorization" "central_zone_west" {
count = local.region == "us-gov-west-1" && local.is_shared_vpc ? 1 : 0

provider = aws.self
vpc_id = var.route53_endpoints.route53_main["us-gov-west-1"]
vpc_region = var.region_map["west"]
zone_id = aws_route53_zone.cluster_domain.zone_id
}

resource "aws_route53_zone_association" "central_zone_west" {
count = local.region == "us-gov-west-1" && local.is_shared_vpc ? 1 : 0

provider = aws.route53_main
vpc_id = var.route53_endpoints.route53_main["us-gov-west-1"]
vpc_region = var.region_map["west"]
Expand All @@ -139,17 +131,13 @@ resource "aws_route53_zone_association" "central_zone_west" {
# east region
#---
resource "aws_route53_vpc_association_authorization" "legacy_zone_east" {
count = local.region == "us-gov-east-1" && local.is_shared_vpc && local.environment_abbr == "prod" ? 1 : 0

provider = aws.self
vpc_id = var.route53_endpoints.route53_main_legacy["us-gov-east-1"]
vpc_region = var.region_map["east"]
zone_id = aws_route53_zone.cluster_domain.zone_id
}

resource "aws_route53_zone_association" "legacy_zone_east" {
count = local.region == "us-gov-east-1" && local.is_shared_vpc && local.environment_abbr == "prod" ? 1 : 0

provider = aws.route53_main_legacy
vpc_id = var.route53_endpoints.route53_main_legacy["us-gov-east-1"]
vpc_region = var.region_map["east"]
Expand All @@ -162,17 +150,13 @@ resource "aws_route53_zone_association" "legacy_zone_east" {
# west region
#-------------------------------------------------
resource "aws_route53_vpc_association_authorization" "legacy_zone_west" {
count = local.region == "us-gov-west-1" && local.is_shared_vpc && local.environment_abbr == "prod" ? 1 : 0

provider = aws.self
vpc_id = var.route53_endpoints.route53_main_legacy["us-gov-west-1"]
vpc_region = var.region_map["west"]
zone_id = aws_route53_zone.cluster_domain.zone_id
}

resource "aws_route53_zone_association" "legacy_zone_west" {
count = local.region == "us-gov-west-1" && local.is_shared_vpc && local.environment_abbr == "prod" ? 1 : 0

provider = aws.route53_main_legacy
vpc_id = var.route53_endpoints.route53_main_legacy["us-gov-west-1"]
vpc_region = var.region_map["west"]
Expand Down

0 comments on commit 5907ae8

Please sign in to comment.