From 169e6ed7c05baff02d750cad1e54428568d190c9 Mon Sep 17 00:00:00 2001 From: Ryan Ahearn Date: Mon, 2 Dec 2024 17:16:03 -0500 Subject: [PATCH] Address PR feedback around tags and egress-proxy outputs --- database/main.tf | 2 +- database/tests/creation.tftest.hcl | 2 +- domain/main.tf | 2 +- domain/tests/creation.tftest.hcl | 2 +- egress_proxy/outputs.tf | 13 +++++++++++++ redis/main.tf | 2 +- redis/tests/creation.tftest.hcl | 2 +- s3/main.tf | 2 +- s3/tests/creation.tftest.hcl | 2 +- 9 files changed, 21 insertions(+), 8 deletions(-) diff --git a/database/main.tf b/database/main.tf index 2816ddc..8679665 100644 --- a/database/main.tf +++ b/database/main.tf @@ -1,5 +1,5 @@ locals { - tags = setunion(["terraform-cloudgov"], var.tags) + tags = setunion(["terraform-cloudgov-managed"], var.tags) } data "cloudfoundry_service_plans" "rds" { diff --git a/database/tests/creation.tftest.hcl b/database/tests/creation.tftest.hcl index ab7a3dc..579be05 100644 --- a/database/tests/creation.tftest.hcl +++ b/database/tests/creation.tftest.hcl @@ -8,7 +8,7 @@ variables { cf_space_id = "15836eb6-a57e-4579-bca7-99764c5a01a4" rds_plan_name = "micro-psql" name = "terraform-cloudgov-rds-test" - tags = ["terraform-cloudgov", "tests"] + tags = ["terraform-cloudgov-managed", "tests"] json_params = jsonencode({ backup_retention_period = 30 }) diff --git a/domain/main.tf b/domain/main.tf index 6262d8e..c553799 100644 --- a/domain/main.tf +++ b/domain/main.tf @@ -1,6 +1,6 @@ locals { service_name = (var.name == "" ? "${var.app_names[0]}-${var.domain_name}" : var.name) - tags = setunion(["terraform-cloudgov"], var.tags) + tags = setunion(["terraform-cloudgov-managed"], var.tags) connect_route = length(var.app_names) > 0 endpoint = (local.connect_route ? cloudfoundry_route.origin_route_connected.0.url : cloudfoundry_route.origin_route.0.url) } diff --git a/domain/tests/creation.tftest.hcl b/domain/tests/creation.tftest.hcl index dfe5eaa..d3e5b93 100644 --- a/domain/tests/creation.tftest.hcl +++ b/domain/tests/creation.tftest.hcl @@ -40,7 +40,7 @@ variables { domain_name = "apps.internal" name = "terraform-cloudgov-domain-test" app_names = ["test-app-does-not-exist"] - tags = ["terraform-cloudgov", "tests"] + tags = ["terraform-cloudgov-managed", "tests"] } run "test_domain_creation" { diff --git a/egress_proxy/outputs.tf b/egress_proxy/outputs.tf index 9c1a69a..f5d1799 100644 --- a/egress_proxy/outputs.tf +++ b/egress_proxy/outputs.tf @@ -32,3 +32,16 @@ output "password" { output "app_id" { value = cloudfoundry_app.egress_app.id } + +output "json_credentials" { + value = jsonencode({ + "https_uri" = local.https_proxy + "http_uri" = local.http_proxy + "domain" = local.domain + "username" = local.username + "password" = local.password + "https_port" = local.https_port + "http_port" = local.http_port + }) + sensitive = true +} diff --git a/redis/main.tf b/redis/main.tf index 67d8470..923718b 100644 --- a/redis/main.tf +++ b/redis/main.tf @@ -1,5 +1,5 @@ locals { - tags = setunion(["terraform-cloudgov"], var.tags) + tags = setunion(["terraform-cloudgov-managed"], var.tags) } data "cloudfoundry_service_plans" "redis" { diff --git a/redis/tests/creation.tftest.hcl b/redis/tests/creation.tftest.hcl index c9b89cf..8b5ecbd 100644 --- a/redis/tests/creation.tftest.hcl +++ b/redis/tests/creation.tftest.hcl @@ -8,7 +8,7 @@ variables { cf_space_id = "15836eb6-a57e-4579-bca7-99764c5a01a4" redis_plan_name = "redis-dev" name = "terraform-cloudgov-redis-test" - tags = ["terraform-cloudgov", "tests"] + tags = ["terraform-cloudgov-managed", "tests"] json_params = jsonencode({ engineVersion = "7.0" }) diff --git a/s3/main.tf b/s3/main.tf index 3b66a46..1ad84e1 100644 --- a/s3/main.tf +++ b/s3/main.tf @@ -1,5 +1,5 @@ locals { - tags = setunion(["terraform-cloudgov"], var.tags) + tags = setunion(["terraform-cloudgov-managed"], var.tags) } data "cloudfoundry_service_plans" "s3" { diff --git a/s3/tests/creation.tftest.hcl b/s3/tests/creation.tftest.hcl index 8f6f220..dc059b8 100644 --- a/s3/tests/creation.tftest.hcl +++ b/s3/tests/creation.tftest.hcl @@ -8,7 +8,7 @@ variables { cf_space_id = "15836eb6-a57e-4579-bca7-99764c5a01a4" s3_plan_name = "basic-sandbox" name = "terraform-cloudgov-s3-test" - tags = ["terraform-cloudgov", "tests"] + tags = ["terraform-cloudgov-managed", "tests"] } run "test_bucket_creation" {