Skip to content

Commit

Permalink
add var.registry to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Annie Hedgpeth committed Nov 17, 2023
1 parent 17ee60f commit 523d742
Show file tree
Hide file tree
Showing 15 changed files with 43 additions and 40 deletions.
8 changes: 4 additions & 4 deletions tests/private-active-active/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
3 changes: 2 additions & 1 deletion tests/private-active-active/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
}
8 changes: 4 additions & 4 deletions tests/private-active-active/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down
8 changes: 4 additions & 4 deletions tests/private-tcp-active-active/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
3 changes: 2 additions & 1 deletion tests/private-tcp-active-active/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
}
8 changes: 4 additions & 4 deletions tests/private-tcp-active-active/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down
4 changes: 2 additions & 2 deletions tests/public-active-active/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
3 changes: 2 additions & 1 deletion tests/public-active-active/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
}

8 changes: 4 additions & 4 deletions tests/public-active-active/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down
8 changes: 4 additions & 4 deletions tests/standalone-external/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
3 changes: 2 additions & 1 deletion tests/standalone-external/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
}
2 changes: 1 addition & 1 deletion tests/standalone-external/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ output "replicated_console_password" {
}

output "replicated_console_url" {
value = "${module.standalone_external.tfe_application_url}:8800"
value = module.standalone_mounted_disk.tfe_console_url
description = "Terraform Enterprise Console URL"
}

Expand Down
8 changes: 4 additions & 4 deletions tests/standalone-external/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down
7 changes: 3 additions & 4 deletions tests/standalone-mounted-disk/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ locals {
Environment = "${local.friendly_name_prefix}-test-standalone-mounted-disk"
Description = "Standalone, Mounted Disk scenario"
Repository = "hashicorp/terraform-azurerm-terraform-enterprise"
Team = "Terraform Enterprise on Prem"
Team = "Terraform Enterprise"
OkToDelete = "True"
}
vm_image_id = (
Expand Down Expand Up @@ -40,8 +40,7 @@ locals {
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"
registry = "images.releases.hashicorp.com"
registry = "quay.io"
utility_module_test = var.license_file == null
}
2 changes: 1 addition & 1 deletion tests/standalone-mounted-disk/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ output "replicated_console_password" {
}

output "replicated_console_url" {
value = module.standalone_mounted_disk.replicated_console_url
value = module.standalone_mounted_disk.tfe_console_url
description = "Terraform Enterprise Console URL"
}

Expand Down

0 comments on commit 523d742

Please sign in to comment.