From 2933ded5092ed6a3f27570310ca10c2f6f535d86 Mon Sep 17 00:00:00 2001 From: John Skiles Skinner Date: Thu, 25 Jul 2024 17:46:19 -0700 Subject: [PATCH 1/3] Experiment with uncommenting use of api_network_route module --- terraform/sandbox/main.tf | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/terraform/sandbox/main.tf b/terraform/sandbox/main.tf index ad0748199..f49560c62 100644 --- a/terraform/sandbox/main.tf +++ b/terraform/sandbox/main.tf @@ -40,11 +40,11 @@ module "logo_upload_bucket" { # 1) the api app has first been deployed # 2) the admin app has first been deployed ########################################################################### -# module "api_network_route" { -# source = "../shared/container_networking" +module "api_network_route" { # experiment with uncommenting + source = "../shared/container_networking" -# cf_org_name = local.cf_org_name -# cf_space_name = local.cf_space_name -# source_app_name = "${local.app_name}-${local.env}" -# destination_app_name = "notify-api-${local.env}" -# } + cf_org_name = local.cf_org_name + cf_space_name = local.cf_space_name + source_app_name = "${local.app_name}-${local.env}" + destination_app_name = "notify-api-${local.env}" +} From 883b39cd932db3350fb9af34e5c2817bffd8d8a2 Mon Sep 17 00:00:00 2001 From: John Skiles Skinner Date: Thu, 25 Jul 2024 18:59:23 -0700 Subject: [PATCH 2/3] Update comment --- terraform/sandbox/main.tf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/terraform/sandbox/main.tf b/terraform/sandbox/main.tf index f49560c62..838d86aa8 100644 --- a/terraform/sandbox/main.tf +++ b/terraform/sandbox/main.tf @@ -35,12 +35,12 @@ module "logo_upload_bucket" { } # ########################################################################## -# The following lines need to be commented out for the initial `terraform apply` -# It can be re-enabled after: -# 1) the api app has first been deployed -# 2) the admin app has first been deployed +# Connection the allows notify-admin-sandbox and notify-api-sandbox to talk. +# https://cloud.gov/docs/management/container-to-container/ +# Terraform block will fail to apply unless both apps exist in Cloud.gov. +# See also: /docs/all.md#api-request-failed ########################################################################### -module "api_network_route" { # experiment with uncommenting +module "api_network_route" { source = "../shared/container_networking" cf_org_name = local.cf_org_name From 0c1f824ca3715c1dca68bdde994a9200d18a505c Mon Sep 17 00:00:00 2001 From: John Skiles Skinner Date: Thu, 25 Jul 2024 19:21:20 -0700 Subject: [PATCH 3/3] Remove outdated comments --- terraform/demo/main.tf | 6 ------ terraform/production/main.tf | 6 ------ terraform/sandbox/main.tf | 8 +------- terraform/staging/main.tf | 6 ------ 4 files changed, 1 insertion(+), 25 deletions(-) diff --git a/terraform/demo/main.tf b/terraform/demo/main.tf index 4223e29e4..d0b8ef92c 100644 --- a/terraform/demo/main.tf +++ b/terraform/demo/main.tf @@ -34,12 +34,6 @@ module "logo_upload_bucket" { name = "${local.app_name}-logo-upload-bucket-${local.env}" } -# ########################################################################## -# The following lines need to be commented out for the initial `terraform apply` -# It can be re-enabled after: -# 1) the api app has first been deployed -# 2) the admin app has first been deployed -########################################################################### module "api_network_route" { source = "../shared/container_networking" diff --git a/terraform/production/main.tf b/terraform/production/main.tf index 771558ce2..9e02b3272 100644 --- a/terraform/production/main.tf +++ b/terraform/production/main.tf @@ -34,12 +34,6 @@ module "logo_upload_bucket" { name = "${local.app_name}-logo-upload-bucket-${local.env}" } -# ########################################################################## -# The following lines need to be commented out for the initial `terraform apply` -# It can be re-enabled after: -# 1) the api app has first been deployed -# 2) the admin app has first been deployed -########################################################################### module "api_network_route" { source = "../shared/container_networking" diff --git a/terraform/sandbox/main.tf b/terraform/sandbox/main.tf index 838d86aa8..76495b4c9 100644 --- a/terraform/sandbox/main.tf +++ b/terraform/sandbox/main.tf @@ -34,13 +34,7 @@ module "logo_upload_bucket" { name = "${local.app_name}-logo-upload-bucket-${local.env}" } -# ########################################################################## -# Connection the allows notify-admin-sandbox and notify-api-sandbox to talk. -# https://cloud.gov/docs/management/container-to-container/ -# Terraform block will fail to apply unless both apps exist in Cloud.gov. -# See also: /docs/all.md#api-request-failed -########################################################################### -module "api_network_route" { +module "api_network_route" { # API and Admin apps must both exist in Cloud source = "../shared/container_networking" cf_org_name = local.cf_org_name diff --git a/terraform/staging/main.tf b/terraform/staging/main.tf index 99ef28590..87c1e64dd 100644 --- a/terraform/staging/main.tf +++ b/terraform/staging/main.tf @@ -34,12 +34,6 @@ module "logo_upload_bucket" { name = "${local.app_name}-logo-upload-bucket-${local.env}" } -# ########################################################################## -# The following lines need to be commented out for the initial `terraform apply` -# It can be re-enabled after: -# 1) the api app has first been deployed -# 2) the admin app has first been deployed -########################################################################### module "api_network_route" { source = "../shared/container_networking"