diff --git a/main.tf b/main.tf index e26c86bf..6870e0d7 100644 --- a/main.tf +++ b/main.tf @@ -164,8 +164,10 @@ module "tfe_init_fdo" { var.network_cidr ] - registry_username = var.registry_username - registry_password = var.registry_password + registry = var.registry + registry_password = var.registry == "images.releases.hashicorp.com" ? var.hc_license : var.registry_password + registry_username = var.registry_username + docker_compose_yaml = module.docker_compose_config[0].docker_compose_yaml } diff --git a/tests/private-active-active/locals.tf b/tests/private-active-active/locals.tf index 1e42bed8..3fd0dd2a 100644 --- a/tests/private-active-active/locals.tf +++ b/tests/private-active-active/locals.tf @@ -3,17 +3,17 @@ locals { common_tags = { - Terraform = "cloud" Environment = "${local.friendly_name_prefix}-test-private-active-active" Description = "Private Active/Active" Repository = "hashicorp/terraform-azurerm-terraform-enterprise" - Team = "Terraform Enterprise on Prem" + Team = "Terraform Enterprise" OkToDelete = "True" } friendly_name_prefix = random_string.friendly_name.id - resource_group_name = module.private_active_active.resource_group_name + network_proxy_subnet_cidr = "10.0.80.0/20" proxy_user = "proxyuser" proxy_port = "3128" - network_proxy_subnet_cidr = "10.0.80.0/20" + registry = "quay.io" + resource_group_name = module.private_active_active.resource_group_name } diff --git a/tests/private-active-active/main.tf b/tests/private-active-active/main.tf index 238184f6..12fad690 100644 --- a/tests/private-active-active/main.tf +++ b/tests/private-active-active/main.tf @@ -86,7 +86,8 @@ module "private_active_active" { http_port = 8080 https_port = 8443 license_reporting_opt_out = true + registry = local.registry registry_password = var.registry_password registry_username = var.registry_username - tfe_image = "quay.io/hashicorp/terraform-enterprise:${var.tfe_image_tag}" + tfe_image = "${local.registry}/hashicorp/terraform-enterprise:${var.tfe_image_tag}" } diff --git a/tests/private-active-active/variables.tf b/tests/private-active-active/variables.tf index 26f40de1..c654bf8f 100644 --- a/tests/private-active-active/variables.tf +++ b/tests/private-active-active/variables.tf @@ -55,16 +55,16 @@ variable "proxy_public_ssh_key_secret_name" { description = "The name of the public SSH key secret for the proxy." } -variable "registry_username" { +variable "registry_password" { default = null type = string - description = "(Not needed if is_replicated_deployment is true) The username for the docker registry from which to source the terraform_enterprise container images." + description = "(Not needed if is_replicated_deployment is true) The password for the docker registry from which to source the terraform_enterprise container images." } -variable "registry_password" { +variable "registry_username" { default = null type = string - description = "(Not needed if is_replicated_deployment is true) The password for the docker registry from which to source the terraform_enterprise container images." + description = "(Not needed if is_replicated_deployment is true) The username for the docker registry from which to source the terraform_enterprise container images." } variable "resource_group_name_dns" { diff --git a/tests/private-tcp-active-active/locals.tf b/tests/private-tcp-active-active/locals.tf index 6e0c36bd..1fac9c2f 100644 --- a/tests/private-tcp-active-active/locals.tf +++ b/tests/private-tcp-active-active/locals.tf @@ -3,17 +3,17 @@ locals { common_tags = { - Terraform = "cloud" Environment = "${local.friendly_name_prefix}-test-private-tcp-active-active" Description = "Private TCP Active/Active" Repository = "hashicorp/terraform-azurerm-terraform-enterprise" - Team = "Terraform Enterprise on Prem" + Team = "Terraform Enterprise" OkToDelete = "True" } friendly_name_prefix = random_string.friendly_name.id - resource_group_name = module.private_tcp_active_active.resource_group_name + network_proxy_subnet_cidr = "10.0.80.0/20" proxy_user = "proxyuser" proxy_port = "3128" - network_proxy_subnet_cidr = "10.0.80.0/20" + registry = "quay.io" + resource_group_name = module.private_tcp_active_active.resource_group_name } diff --git a/tests/private-tcp-active-active/main.tf b/tests/private-tcp-active-active/main.tf index 3e2d9ad5..472d654a 100644 --- a/tests/private-tcp-active-active/main.tf +++ b/tests/private-tcp-active-active/main.tf @@ -87,7 +87,8 @@ module "private_tcp_active_active" { http_port = 8080 https_port = 8443 license_reporting_opt_out = true + registry = local.registry registry_password = var.registry_password registry_username = var.registry_username - tfe_image = "quay.io/hashicorp/terraform-enterprise:${var.tfe_image_tag}" + 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 e1bad9f7..fd39de27 100644 --- a/tests/private-tcp-active-active/variables.tf +++ b/tests/private-tcp-active-active/variables.tf @@ -60,16 +60,16 @@ variable "proxy_public_ssh_key_secret_name" { description = "The name of the public SSH key secret for the proxy." } -variable "registry_username" { +variable "registry_password" { default = null type = string - description = "(Not needed if is_replicated_deployment is true) The username for the docker registry from which to source the terraform_enterprise container images." + description = "(Not needed if is_replicated_deployment is true) The password for the docker registry from which to source the terraform_enterprise container images." } -variable "registry_password" { +variable "registry_username" { default = null type = string - description = "(Not needed if is_replicated_deployment is true) The password for the docker registry from which to source the terraform_enterprise container images." + description = "(Not needed if is_replicated_deployment is true) The username for the docker registry from which to source the terraform_enterprise container images." } variable "resource_group_name_dns" { diff --git a/tests/public-active-active/locals.tf b/tests/public-active-active/locals.tf index 85774e6e..adf37d27 100644 --- a/tests/public-active-active/locals.tf +++ b/tests/public-active-active/locals.tf @@ -3,13 +3,13 @@ locals { common_tags = { - Terraform = "cloud" Environment = "${local.friendly_name_prefix}-test-public-active-active" Description = "Public Active/Active" Repository = "hashicorp/terraform-azurerm-terraform-enterprise" - Team = "Terraform Enterprise on Prem" + Team = "Terraform Enterprise" OkToDelete = "True" } friendly_name_prefix = random_string.friendly_name.id + registry = "quay.io" } diff --git a/tests/public-active-active/main.tf b/tests/public-active-active/main.tf index 65c8320f..edf82c1e 100644 --- a/tests/public-active-active/main.tf +++ b/tests/public-active-active/main.tf @@ -45,8 +45,9 @@ module "public_active_active" { http_port = 8080 https_port = 8443 license_reporting_opt_out = true + registry = local.registry registry_password = var.registry_password registry_username = var.registry_username - tfe_image = "quay.io/hashicorp/terraform-enterprise:${var.tfe_image_tag}" + tfe_image = "${local.registry}/hashicorp/terraform-enterprise:${var.tfe_image_tag}" } diff --git a/tests/public-active-active/variables.tf b/tests/public-active-active/variables.tf index f02eba2e..10b53366 100644 --- a/tests/public-active-active/variables.tf +++ b/tests/public-active-active/variables.tf @@ -45,16 +45,16 @@ variable "key_vault_id" { description = "The identity of the Key Vault which contains secrets and certificates." } -variable "registry_username" { +variable "registry_password" { default = null type = string - description = "(Not needed if is_replicated_deployment is true) The username for the docker registry from which to source the terraform_enterprise container images." + description = "(Not needed if is_replicated_deployment is true) The password for the docker registry from which to source the terraform_enterprise container images." } -variable "registry_password" { +variable "registry_username" { default = null type = string - description = "(Not needed if is_replicated_deployment is true) The password for the docker registry from which to source the terraform_enterprise container images." + description = "(Not needed if is_replicated_deployment is true) The username for the docker registry from which to source the terraform_enterprise container images." } variable "resource_group_name_dns" { diff --git a/tests/standalone-external/locals.tf b/tests/standalone-external/locals.tf index f67977c5..7a92e3ad 100644 --- a/tests/standalone-external/locals.tf +++ b/tests/standalone-external/locals.tf @@ -3,14 +3,14 @@ locals { common_tags = { - Terraform = "False" Environment = "${local.friendly_name_prefix}-test-standalone-external" - Description = "Standalone, External Services scenario deployed from CircleCI" + Description = "Standalone, External Services scenario" Repository = "hashicorp/terraform-azurerm-terraform-enterprise" - Team = "Terraform Enterprise on Prem" + Team = "Terraform Enterprise" OkToDelete = "True" } - utility_module_test = var.license_file == null friendly_name_prefix = random_string.friendly_name.id + registry = "quay.io" + utility_module_test = var.license_file == null } diff --git a/tests/standalone-external/main.tf b/tests/standalone-external/main.tf index 0beb5a6e..d49aa8fa 100644 --- a/tests/standalone-external/main.tf +++ b/tests/standalone-external/main.tf @@ -59,7 +59,8 @@ module "standalone_external" { http_port = 8080 https_port = 8443 license_reporting_opt_out = true + registry = local.registry registry_password = var.registry_password registry_username = var.registry_username - tfe_image = "quay.io/hashicorp/terraform-enterprise:${var.tfe_image_tag}" + tfe_image = "${local.registry}/hashicorp/terraform-enterprise:${var.tfe_image_tag}" } diff --git a/tests/standalone-external/outputs.tf b/tests/standalone-external/outputs.tf index c43b242a..e31df0a6 100644 --- a/tests/standalone-external/outputs.tf +++ b/tests/standalone-external/outputs.tf @@ -7,7 +7,7 @@ output "replicated_console_password" { } output "replicated_console_url" { - value = "${module.standalone_external.tfe_application_url}:8800" + value = module.standalone_external.tfe_console_url description = "Terraform Enterprise Console URL" } diff --git a/tests/standalone-external/variables.tf b/tests/standalone-external/variables.tf index 6b10eff8..1328bb8a 100644 --- a/tests/standalone-external/variables.tf +++ b/tests/standalone-external/variables.tf @@ -48,16 +48,16 @@ variable "license_file" { description = "The local path to the Terraform Enterprise license to be provided by CI." } -variable "registry_username" { +variable "registry_password" { default = null type = string - description = "(Not needed if is_replicated_deployment is true) The username for the docker registry from which to source the terraform_enterprise container images." + description = "(Not needed if is_replicated_deployment is true) The password for the docker registry from which to source the terraform_enterprise container images." } -variable "registry_password" { +variable "registry_username" { default = null type = string - description = "(Not needed if is_replicated_deployment is true) The password for the docker registry from which to source the terraform_enterprise container images." + description = "(Not needed if is_replicated_deployment is true) The username for the docker registry from which to source the terraform_enterprise container images." } variable "resource_group_name_dns" { diff --git a/tests/standalone-mounted-disk/locals.tf b/tests/standalone-mounted-disk/locals.tf index de23af0e..d6e7db6f 100644 --- a/tests/standalone-mounted-disk/locals.tf +++ b/tests/standalone-mounted-disk/locals.tf @@ -3,11 +3,10 @@ locals { common_tags = { - Terraform = "False" Environment = "${local.friendly_name_prefix}-test-standalone-mounted-disk" - Description = "Standalone, Mounted Disk scenario deployed from CircleCI" + Description = "Standalone, Mounted Disk scenario" Repository = "hashicorp/terraform-azurerm-terraform-enterprise" - Team = "Terraform Enterprise on Prem" + Team = "Terraform Enterprise" OkToDelete = "True" } vm_image_id = ( @@ -40,6 +39,8 @@ locals { var.vm_image_sku != null && var.vm_image_version != null ) ? var.vm_image_version : null - utility_module_test = var.license_file == null + friendly_name_prefix = random_string.friendly_name.id + registry = "quay.io" + utility_module_test = var.license_file == null } diff --git a/tests/standalone-mounted-disk/main.tf b/tests/standalone-mounted-disk/main.tf index 17cf7c73..bca7e17f 100644 --- a/tests/standalone-mounted-disk/main.tf +++ b/tests/standalone-mounted-disk/main.tf @@ -69,7 +69,8 @@ module "standalone_mounted_disk" { http_port = 8080 https_port = 8443 license_reporting_opt_out = true + registry = local.registry registry_password = var.registry_password registry_username = var.registry_username - tfe_image = "quay.io/hashicorp/terraform-enterprise:${var.tfe_image_tag}" + tfe_image = "${local.registry}/hashicorp/terraform-enterprise:${var.tfe_image_tag}" } diff --git a/tests/standalone-mounted-disk/outputs.tf b/tests/standalone-mounted-disk/outputs.tf index 7374b979..359a15fe 100644 --- a/tests/standalone-mounted-disk/outputs.tf +++ b/tests/standalone-mounted-disk/outputs.tf @@ -7,7 +7,7 @@ output "replicated_console_password" { } output "replicated_console_url" { - value = "${module.standalone_mounted_disk.tfe_application_url}:8800" + value = module.standalone_mounted_disk.tfe_console_url description = "Terraform Enterprise Console URL" } diff --git a/tests/standalone-mounted-disk/variables.tf b/tests/standalone-mounted-disk/variables.tf index f9321cba..f64ceab2 100644 --- a/tests/standalone-mounted-disk/variables.tf +++ b/tests/standalone-mounted-disk/variables.tf @@ -53,16 +53,16 @@ variable "license_file" { description = "The local path to the Terraform Enterprise license to be provided by CI." } -variable "registry_username" { +variable "registry_password" { default = null type = string - description = "(Not needed if is_replicated_deployment is true) The username for the docker registry from which to source the terraform_enterprise container images." + description = "(Not needed if is_replicated_deployment is true) The password for the docker registry from which to source the terraform_enterprise container images." } -variable "registry_password" { +variable "registry_username" { default = null type = string - description = "(Not needed if is_replicated_deployment is true) The password for the docker registry from which to source the terraform_enterprise container images." + description = "(Not needed if is_replicated_deployment is true) The username for the docker registry from which to source the terraform_enterprise container images." } variable "resource_group_name_dns" { diff --git a/variables.tf b/variables.tf index 18c7f09d..36cc79ee 100644 --- a/variables.tf +++ b/variables.tf @@ -36,9 +36,9 @@ variable "tfe_subdomain" { } variable "tfe_image" { - default = "quay.io/hashicorp/terraform-enterprise:latest" + default = "images.releases.hashicorp.com/hashicorp/terraform-enterprise:v202311-1" type = string - description = "(Not needed if is_replicated_deployment is true) The registry path, image name, and image version (e.g. \"quay.io/hashicorp/terraform-enterprise:1234567\")" + description = "(Not needed if is_replicated_deployment is true) The registry path, image name, and image version" } # DNS @@ -841,16 +841,22 @@ variable "hairpin_addressing" { description = "In some cloud environments, HTTP clients running on instances behind a loadbalancer cannot send requests to the public hostname of that load balancer. Use this setting to configure TFE services to redirect requests for the installation's FQDN to the instance's internal IP address. Defaults to false." } -variable "registry_username" { - default = null +variable "registry" { + default = "images.releases.hashicorp.com" type = string - description = "(Not needed if is_replicated_deployment is true) The username for the docker registry from which to source the terraform_enterprise container images." + description = "(Not needed if is_replicated_deployment is true) The docker registry from which to source the terraform_enterprise container images." } variable "registry_password" { default = null type = string - description = "(Not needed if is_replicated_deployment is true) The password for the docker registry from which to source the terraform_enterprise container images." + description = "(Not needed if is_replicated_deployment is true or if registry is 'images.releases.hashicorp.com') The password for the docker registry from which to source the terraform_enterprise container images." +} + +variable "registry_username" { + default = "terraform" + type = string + description = "(Not needed if is_replicated_deployment is true) The username for the docker registry from which to source the terraform_enterprise container images." } variable "run_pipeline_image" {