From a3359a4549b228da8719acbdd13cf16ce56db6c6 Mon Sep 17 00:00:00 2001 From: John Kerry Date: Wed, 3 Apr 2024 10:56:40 -0400 Subject: [PATCH] Removes non-consolidated service settings. --- main.tf | 27 +++++---- tests/private-active-active/main.tf | 17 +++--- tests/private-active-active/variables.tf | 6 -- tests/private-tcp-active-active/main.tf | 58 +++++++++---------- tests/private-tcp-active-active/variables.tf | 6 -- tests/public-active-active/main.tf | 13 ++--- tests/public-active-active/variables.tf | 7 --- .../standalone-external-rhel8-worker/main.tf | 9 ++- .../variables.tf | 6 -- tests/standalone-mounted-disk/main.tf | 17 +++--- tests/standalone-mounted-disk/variables.tf | 6 -- variables.tf | 6 -- 12 files changed, 67 insertions(+), 111 deletions(-) diff --git a/main.tf b/main.tf index 231af552..7467bda8 100644 --- a/main.tf +++ b/main.tf @@ -207,20 +207,19 @@ module "settings" { count = var.is_replicated_deployment ? 1 : 0 # TFE Base Configuration - consolidated_services_enabled = var.consolidated_services_enabled - production_type = var.operational_mode - disk_path = var.disk_path - iact_subnet_list = var.iact_subnet_list - iact_subnet_time_limit = var.iact_subnet_time_limit - release_sequence = var.release_sequence - tls_vers = var.tls_vers - metrics_endpoint_enabled = var.metrics_endpoint_enabled - metrics_endpoint_port_http = var.metrics_endpoint_port_http - metrics_endpoint_port_https = var.metrics_endpoint_port_https - custom_image_tag = var.custom_image_tag - custom_agent_image_tag = var.custom_agent_image_tag - capacity_concurrency = var.capacity_concurrency - capacity_memory = var.capacity_memory + production_type = var.operational_mode + disk_path = var.disk_path + iact_subnet_list = var.iact_subnet_list + iact_subnet_time_limit = var.iact_subnet_time_limit + release_sequence = var.release_sequence + tls_vers = var.tls_vers + metrics_endpoint_enabled = var.metrics_endpoint_enabled + metrics_endpoint_port_http = var.metrics_endpoint_port_http + metrics_endpoint_port_https = var.metrics_endpoint_port_https + custom_image_tag = var.custom_image_tag + custom_agent_image_tag = var.custom_agent_image_tag + capacity_concurrency = var.capacity_concurrency + capacity_memory = var.capacity_memory extra_no_proxy = local.extra_no_proxy diff --git a/tests/private-active-active/main.tf b/tests/private-active-active/main.tf index 91fc4f01..67fe9179 100644 --- a/tests/private-active-active/main.tf +++ b/tests/private-active-active/main.tf @@ -34,15 +34,14 @@ module "secrets" { module "tfe" { source = "../.." - consolidated_services_enabled = var.consolidated_services_enabled - distribution = "rhel" - dns_zone_name = data.google_dns_managed_zone.main.name - fqdn = "${random_pet.main.id}.${data.google_dns_managed_zone.main.dns_name}" - namespace = random_pet.main.id - existing_service_account_id = var.existing_service_account_id - node_count = 2 - tfe_license_secret_id = try(module.secrets[0].license_secret, data.tfe_outputs.base.values.license_secret_id) - labels = local.labels + distribution = "rhel" + dns_zone_name = data.google_dns_managed_zone.main.name + fqdn = "${random_pet.main.id}.${data.google_dns_managed_zone.main.dns_name}" + namespace = random_pet.main.id + existing_service_account_id = var.existing_service_account_id + node_count = 2 + tfe_license_secret_id = try(module.secrets[0].license_secret, data.tfe_outputs.base.values.license_secret_id) + labels = local.labels iact_subnet_list = ["${module.test_proxy.compute_instance.network_interface[0].network_ip}/32"] iact_subnet_time_limit = 1440 diff --git a/tests/private-active-active/variables.tf b/tests/private-active-active/variables.tf index 1db4b5c4..90cc9cbe 100644 --- a/tests/private-active-active/variables.tf +++ b/tests/private-active-active/variables.tf @@ -1,12 +1,6 @@ # Copyright (c) HashiCorp, Inc. # SPDX-License-Identifier: MPL-2.0 -variable "consolidated_services_enabled" { - default = true - type = bool - description = "(Required) True if TFE uses consolidated services." -} - variable "existing_service_account_id" { default = null type = string diff --git a/tests/private-tcp-active-active/main.tf b/tests/private-tcp-active-active/main.tf index 993f5b65..12f0fb1c 100644 --- a/tests/private-tcp-active-active/main.tf +++ b/tests/private-tcp-active-active/main.tf @@ -36,35 +36,34 @@ module "secrets" { module "tfe" { source = "../.." - bypass_preflight_checks = true - consolidated_services_enabled = var.consolidated_services_enabled - distribution = "rhel" - dns_zone_name = data.google_dns_managed_zone.main.name - fqdn = "${random_pet.main.id}.${data.google_dns_managed_zone.main.dns_name}" - namespace = random_pet.main.id - existing_service_account_id = var.existing_service_account_id - node_count = 2 - tfe_license_secret_id = try(module.secrets[0].license_secret, data.tfe_outputs.base.values.license_secret_id) - labels = local.labels - ca_certificate_secret_id = data.tfe_outputs.base.values.ca_certificate_secret_id - iact_subnet_list = ["${module.test_proxy.compute_instance.network_interface[0].network_ip}/32"] - iact_subnet_time_limit = 1440 - load_balancer = "PRIVATE_TCP" - proxy_ip = module.test_proxy.proxy_ip - proxy_port = module.test_proxy.proxy_port - redis_auth_enabled = true - redis_version = "REDIS_7_0" - ssl_certificate_secret = data.tfe_outputs.base.values.wildcard_ssl_certificate_secret_id - ssl_private_key_secret = data.tfe_outputs.base.values.wildcard_ssl_private_key_secret_id - tls_bootstrap_cert_pathname = "/var/lib/terraform-enterprise/certificate.pem" - tls_bootstrap_key_pathname = "/var/lib/terraform-enterprise/key.pem" - vm_disk_source_image = data.google_compute_image.rhel.self_link - vm_machine_type = "n1-standard-32" - vm_mig_check_interval_sec = 300 - vm_mig_healthy_threshold = 1 - vm_mig_initial_delay_sec = 3600 - vm_mig_timeout_sec = 300 - vm_mig_unhealthy_threshold = 10 + bypass_preflight_checks = true + distribution = "rhel" + dns_zone_name = data.google_dns_managed_zone.main.name + fqdn = "${random_pet.main.id}.${data.google_dns_managed_zone.main.dns_name}" + namespace = random_pet.main.id + existing_service_account_id = var.existing_service_account_id + node_count = 2 + tfe_license_secret_id = try(module.secrets[0].license_secret, data.tfe_outputs.base.values.license_secret_id) + labels = local.labels + ca_certificate_secret_id = data.tfe_outputs.base.values.ca_certificate_secret_id + iact_subnet_list = ["${module.test_proxy.compute_instance.network_interface[0].network_ip}/32"] + iact_subnet_time_limit = 1440 + load_balancer = "PRIVATE_TCP" + proxy_ip = module.test_proxy.proxy_ip + proxy_port = module.test_proxy.proxy_port + redis_auth_enabled = true + redis_version = "REDIS_7_0" + ssl_certificate_secret = data.tfe_outputs.base.values.wildcard_ssl_certificate_secret_id + ssl_private_key_secret = data.tfe_outputs.base.values.wildcard_ssl_private_key_secret_id + tls_bootstrap_cert_pathname = "/var/lib/terraform-enterprise/certificate.pem" + tls_bootstrap_key_pathname = "/var/lib/terraform-enterprise/key.pem" + vm_disk_source_image = data.google_compute_image.rhel.self_link + vm_machine_type = "n1-standard-32" + vm_mig_check_interval_sec = 300 + vm_mig_healthy_threshold = 1 + vm_mig_initial_delay_sec = 3600 + vm_mig_timeout_sec = 300 + vm_mig_unhealthy_threshold = 10 # FDO Specific Values is_replicated_deployment = var.is_replicated_deployment @@ -77,4 +76,3 @@ module "tfe" { registry_username = var.registry_username tfe_image = "${local.registry}/hashicorp/terraform-enterprise:${var.tfe_image_tag}" } - diff --git a/tests/private-tcp-active-active/variables.tf b/tests/private-tcp-active-active/variables.tf index 1db4b5c4..90cc9cbe 100644 --- a/tests/private-tcp-active-active/variables.tf +++ b/tests/private-tcp-active-active/variables.tf @@ -1,12 +1,6 @@ # Copyright (c) HashiCorp, Inc. # SPDX-License-Identifier: MPL-2.0 -variable "consolidated_services_enabled" { - default = true - type = bool - description = "(Required) True if TFE uses consolidated services." -} - variable "existing_service_account_id" { default = null type = string diff --git a/tests/public-active-active/main.tf b/tests/public-active-active/main.tf index b2995422..cd24f949 100644 --- a/tests/public-active-active/main.tf +++ b/tests/public-active-active/main.tf @@ -22,13 +22,12 @@ module "secrets" { module "tfe" { source = "../.." - consolidated_services_enabled = var.consolidated_services_enabled - dns_zone_name = data.google_dns_managed_zone.main.name - fqdn = "${random_pet.main.id}.${data.google_dns_managed_zone.main.dns_name}" - namespace = random_pet.main.id - existing_service_account_id = var.existing_service_account_id - node_count = 2 - tfe_license_secret_id = try(module.secrets[0].license_secret, data.tfe_outputs.base.values.license_secret_id) + dns_zone_name = data.google_dns_managed_zone.main.name + fqdn = "${random_pet.main.id}.${data.google_dns_managed_zone.main.dns_name}" + namespace = random_pet.main.id + existing_service_account_id = var.existing_service_account_id + node_count = 2 + tfe_license_secret_id = try(module.secrets[0].license_secret, data.tfe_outputs.base.values.license_secret_id) distribution = "ubuntu" iact_subnet_list = var.iact_subnet_list diff --git a/tests/public-active-active/variables.tf b/tests/public-active-active/variables.tf index 371394c5..443074e9 100644 --- a/tests/public-active-active/variables.tf +++ b/tests/public-active-active/variables.tf @@ -1,12 +1,6 @@ # Copyright (c) HashiCorp, Inc. # SPDX-License-Identifier: MPL-2.0 -variable "consolidated_services_enabled" { - default = true - type = bool - description = "(Required) True if TFE uses consolidated services." -} - variable "existing_service_account_id" { default = null type = string @@ -91,4 +85,3 @@ variable "tfe" { workspace = string }) } - diff --git a/tests/standalone-external-rhel8-worker/main.tf b/tests/standalone-external-rhel8-worker/main.tf index 66f67bf6..cc8ab2f0 100644 --- a/tests/standalone-external-rhel8-worker/main.tf +++ b/tests/standalone-external-rhel8-worker/main.tf @@ -40,11 +40,10 @@ module "tfe" { node_count = 1 tfe_license_secret_id = try(module.secrets[0].license_secret, data.tfe_outputs.base.values.license_secret_id) - existing_service_account_id = var.existing_service_account_id - custom_image_tag = "${local.repository_location}-docker.pkg.dev/${data.google_project.project.project_id}/${local.repository_name}/rhel-7.9:latest" - iact_subnet_list = ["0.0.0.0/0"] - iact_subnet_time_limit = 60 - consolidated_services_enabled = var.consolidated_services_enabled + existing_service_account_id = var.existing_service_account_id + custom_image_tag = "${local.repository_location}-docker.pkg.dev/${data.google_project.project.project_id}/${local.repository_name}/rhel-7.9:latest" + iact_subnet_list = ["0.0.0.0/0"] + iact_subnet_time_limit = 60 labels = { department = "engineering" description = "standalone-external-services-scenario-deployed-from-gha" diff --git a/tests/standalone-external-rhel8-worker/variables.tf b/tests/standalone-external-rhel8-worker/variables.tf index 2cb761c6..9da7981d 100644 --- a/tests/standalone-external-rhel8-worker/variables.tf +++ b/tests/standalone-external-rhel8-worker/variables.tf @@ -1,12 +1,6 @@ # Copyright (c) HashiCorp, Inc. # SPDX-License-Identifier: MPL-2.0 -variable "consolidated_services_enabled" { - default = true - type = bool - description = "(Required) True if TFE uses consolidated services." -} - variable "existing_service_account_id" { default = null type = string diff --git a/tests/standalone-mounted-disk/main.tf b/tests/standalone-mounted-disk/main.tf index 68bbb216..c12b29c1 100644 --- a/tests/standalone-mounted-disk/main.tf +++ b/tests/standalone-mounted-disk/main.tf @@ -31,15 +31,14 @@ resource "local_file" "private_key_pem" { } module "tfe" { - source = "../.." - consolidated_services_enabled = var.consolidated_services_enabled - disk_path = "/opt/hashicorp/data" - distribution = "ubuntu" - dns_zone_name = data.google_dns_managed_zone.main.name - fqdn = "${random_pet.main.id}.${trimsuffix(data.google_dns_managed_zone.main.dns_name, ".")}" - namespace = random_pet.main.id - node_count = 1 - tfe_license_secret_id = try(module.secrets[0].license_secret, data.tfe_outputs.base.values.license_secret_id) + source = "../.." + disk_path = "/opt/hashicorp/data" + distribution = "ubuntu" + dns_zone_name = data.google_dns_managed_zone.main.name + fqdn = "${random_pet.main.id}.${trimsuffix(data.google_dns_managed_zone.main.dns_name, ".")}" + namespace = random_pet.main.id + node_count = 1 + tfe_license_secret_id = try(module.secrets[0].license_secret, data.tfe_outputs.base.values.license_secret_id) existing_service_account_id = var.existing_service_account_id iact_subnet_list = ["0.0.0.0/0"] diff --git a/tests/standalone-mounted-disk/variables.tf b/tests/standalone-mounted-disk/variables.tf index 1db4b5c4..90cc9cbe 100644 --- a/tests/standalone-mounted-disk/variables.tf +++ b/tests/standalone-mounted-disk/variables.tf @@ -1,12 +1,6 @@ # Copyright (c) HashiCorp, Inc. # SPDX-License-Identifier: MPL-2.0 -variable "consolidated_services_enabled" { - default = true - type = bool - description = "(Required) True if TFE uses consolidated services." -} - variable "existing_service_account_id" { default = null type = string diff --git a/variables.tf b/variables.tf index a142ae68..a0f9755e 100644 --- a/variables.tf +++ b/variables.tf @@ -333,12 +333,6 @@ variable "capacity_memory" { description = "The maximum amount of memory (in megabytes) that a Terraform plan or apply can use on the system; defaults to 512." } -variable "consolidated_services_enabled" { - default = true - type = bool - description = "(Required) True if TFE uses consolidated services." -} - variable "custom_agent_image_tag" { default = null type = string