Skip to content

Commit

Permalink
cleanup tags
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Jul 30, 2024
1 parent 9eb59cf commit 5db3004
Showing 1 changed file with 6 additions and 43 deletions.
49 changes: 6 additions & 43 deletions dns_zones.tf
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ resource "aws_route53_zone" "cluster_domain" {

tags = merge(
local.base_tags,
local.common_tags,
var.tags,
var.application_tags,
{ "Name" = local.cluster_domain_name },
)
}
Expand All @@ -80,10 +78,7 @@ module "route53_cluster_domain_east" {
vpc_id = data.aws_vpc.eks_vpc.id
zone_ids = [aws_route53_zone.cluster_domain.zone_id]

tags = merge(
local.common_tags,
var.application_tags,
)
tags = var.tags
}

module "route53_cluster_domain_west" {
Expand All @@ -98,29 +93,9 @@ module "route53_cluster_domain_west" {
vpc_id = data.aws_vpc.eks_vpc.id
zone_ids = [aws_route53_zone.cluster_domain.zone_id]

tags = merge(
local.common_tags,
var.application_tags,
)
tags = var.tags
}


## # now we need to add the NS records for the new zone to the parent zone
## data "aws_route53_zone" "parent" {
## name = var.vpc_domain_name
## private_zone = true
## }
##
## resource "aws_route53_record" "cluster_domain" {
## allow_overwrite = true
## name = local.cluster_domain_name
## type = "NS"
## ttl = 900
## zone_id = data.aws_route53_zone.parent.zone_id
##
## records = aws_route53_zone.cluster_domain.name_servers
## }

output "cluster_domain_name" {
description = "DNS Zone Name"
value = local.cluster_domain_name
Expand Down Expand Up @@ -165,10 +140,7 @@ module "route53_main_east" {
vpc_id = var.route53_endpoints["route53_main"]["us-gov-east-1"]
zone_ids = [aws_route53_zone.cluster_domain.zone_id]

tags = merge(
local.common_tags,
var.application_tags,
)
tags = var.tags
}

module "route53_main_west" {
Expand All @@ -182,10 +154,7 @@ module "route53_main_west" {
vpc_id = var.route53_endpoints["route53_main"]["us-gov-west-1"]
zone_ids = [aws_route53_zone.cluster_domain.zone_id]

tags = merge(
local.common_tags,
var.application_tags,
)
tags = var.tags
}

#---
Expand All @@ -212,10 +181,7 @@ module "route53_main_legacy_east" {
vpc_id = var.route53_endpoints["route53_main_legacy"]["us-gov-east-1"]
zone_ids = [aws_route53_zone.cluster_domain.zone_id]

tags = merge(
local.common_tags,
var.application_tags,
)
tags = var.tags
}

module "route53_main_legacy_west" {
Expand All @@ -229,8 +195,5 @@ module "route53_main_legacy_west" {
vpc_id = var.route53_endpoints["route53_main_legacy"]["us-gov-west-1"]
zone_ids = [aws_route53_zone.cluster_domain.zone_id]

tags = merge(
local.common_tags,
var.application_tags,
)
tags = var.tags
}

0 comments on commit 5db3004

Please sign in to comment.