-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
155 additions
and
208 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
96 changes: 96 additions & 0 deletions
96
examples/full-setup-tf-upgrade/apps/dns/associate-route53-endpoints.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| locals { | ||
| route53_zone_ids = compact(concat([try(aws_route53_zone.domain_zone[0].zone_id, null)], [for k, v in aws_route53_zone.ptr_zone : v.zone_id])) | ||
| } | ||
|
|
||
| #--- | ||
| # network prod | ||
| #--- | ||
| provider "aws" { | ||
| alias = "route53_main" | ||
| region = var.region_map["east"] | ||
| assume_role { | ||
| role_arn = format("arn:%v:iam::%v:role/r-inf-terraform-route53", data.aws_arn.current.partition, var.route53_endpoints["route53_main"].account_id) | ||
| session_name = var.os_username | ||
| } | ||
| } | ||
|
|
||
| module "route53_main_east" { | ||
| providers = { | ||
| aws.self = aws | ||
| aws.peer = aws.route53_main | ||
| } | ||
|
|
||
| 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 = var.route53_endpoints["route53_main"]["us-gov-east-1"] | ||
| zone_ids = local.route53_zone_ids | ||
|
|
||
| tags = merge( | ||
| local.common_tags, | ||
| var.application_tags, | ||
| ) | ||
| } | ||
|
|
||
| module "route53_main_west" { | ||
| providers = { | ||
| aws.self = aws | ||
| aws.peer = aws.route53_main | ||
| } | ||
|
|
||
| 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 = var.route53_endpoints["route53_main"]["us-gov-west-1"] | ||
| zone_ids = local.route53_zone_ids | ||
|
|
||
| tags = merge( | ||
| local.common_tags, | ||
| var.application_tags, | ||
| ) | ||
| } | ||
|
|
||
| #--- | ||
| # do2-gov ("legacy") | ||
| #--- | ||
| provider "aws" { | ||
| alias = "route53_main_legacy" | ||
| region = var.region_map["east"] | ||
| assume_role { | ||
| role_arn = format("arn:%v:iam::%v:role/r-inf-terraform-route53", data.aws_arn.current.partition, var.route53_endpoints["route53_main_legacy"].account_id) | ||
| session_name = var.os_username | ||
| } | ||
| } | ||
|
|
||
| module "route53_main_legacy_east" { | ||
| providers = { | ||
| aws.self = aws | ||
| aws.peer = aws.route53_main_legacy | ||
| } | ||
|
|
||
| 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 = var.route53_endpoints["route53_main_legacy"]["us-gov-east-1"] | ||
| zone_ids = local.route53_zone_ids | ||
|
|
||
| tags = merge( | ||
| local.common_tags, | ||
| var.application_tags, | ||
| ) | ||
| } | ||
|
|
||
| module "route53_main_legacy_west" { | ||
| providers = { | ||
| aws.self = aws | ||
| aws.peer = aws.route53_main_legacy | ||
| } | ||
|
|
||
| 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 = var.route53_endpoints["route53_main_legacy"]["us-gov-west-1"] | ||
| zone_ids = local.route53_zone_ids | ||
|
|
||
| tags = merge( | ||
| local.common_tags, | ||
| var.application_tags, | ||
| ) | ||
| } | ||
|
|
12 changes: 0 additions & 12 deletions
12
examples/full-setup-tf-upgrade/apps/dns/associate-shared.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
examples/full-setup-tf-upgrade/apps/dns/other-zones.name.tf.example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| module "west_edl_zones" { | ||
| providers = { | ||
| aws.self = aws | ||
| aws.peer = aws.west_edl_dns | ||
| } | ||
|
|
||
| source = "git@github.e.it.census.gov:terraform-modules/aws-vpc-setup.git//route53-zone-association/vpc?ref=tf-upgrade" | ||
| vpc_id = local.vpc_id | ||
| # zones = [ "common.edl.census.gov" ] | ||
| zones = [var.vpc_domain_name] | ||
| } |
11 changes: 0 additions & 11 deletions
11
examples/full-setup-tf-upgrade/apps/dns/provider.main_dns.tf
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
examples/full-setup-tf-upgrade/apps/dns/variables.dns.auto.tfvars
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| dns_zone_description_prefix = "{project} {environment}" | ||
| dns_zone_create = true | ||
| #dns_zone_description_prefix = "EDL-MultiAccount core-shared ugw1" | ||
| dns_zone_description_prefix = "{org} {vpc_name} {compressed_region}" | ||
| dns_zone_create = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
examples/full-setup-tf-upgrade/apps/dns/variables.route53.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| variable "route53_endpoints" { | ||
| description = "Map of target route53 endpoints (for inbound) central VPCs" | ||
| type = map(map(string)) | ||
| default = { | ||
| route53_main = { | ||
| "account_id" = "057405694017" | ||
| "us-gov-east-1" = "vpc-0871ba8a6040d623a" | ||
| "us-gov-west-1" = "vpc-0f03ea065333f72c5" | ||
| } | ||
| route53_main_legacy = { | ||
| "account_id" = "107742151971" | ||
| "us-gov-east-1" = "vpc-099a991da7c4eb8a5" | ||
| "us-gov-west-1" = "vpc-77877a12" | ||
| } | ||
| } | ||
| } |
5 changes: 5 additions & 0 deletions
5
examples/full-setup-tf-upgrade/apps/dns/variables.username.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| variable "os_username" { | ||
| description = "OS username from environment variable, ideally as $USER" | ||
| type = string | ||
| default = null | ||
| } |
Oops, something went wrong.