Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default license secret name to null #229

Merged
merged 6 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tests/private-active-active/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ data "azurerm_key_vault_secret" "vm_key" {
}

data "azurerm_key_vault_secret" "tfe_license" {
count = var.tfe_license_secret_name == null ? 0 : 1

name = var.tfe_license_secret_name
key_vault_id = var.key_vault_id
}
Expand Down
2 changes: 1 addition & 1 deletion tests/private-active-active/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module "private_active_active" {
# Bootstrapping resources
bypass_preflight_checks = true
load_balancer_certificate = data.azurerm_key_vault_certificate.load_balancer
tfe_license_secret_id = data.azurerm_key_vault_secret.tfe_license.id
tfe_license_secret_id = var.tfe_license_secret_name == null ? var.tfe_license_secret_name : data.azurerm_key_vault_secret.tfe_license[0].id
vm_certificate_secret = data.azurerm_key_vault_secret.vm_certificate
vm_key_secret = data.azurerm_key_vault_secret.vm_key
tls_bootstrap_cert_pathname = "/var/lib/terraform-enterprise/certificate.pem"
Expand Down
1 change: 1 addition & 0 deletions tests/private-active-active/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ variable "tfe_image_tag" {
}

variable "tfe_license_secret_name" {
default = null
type = string
description = "Name of the secret under which the Base64 encoded TFE license is stored in the Azure Key Vault"
}
Expand Down
2 changes: 2 additions & 0 deletions tests/private-tcp-active-active/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ data "azurerm_key_vault_secret" "ca_key" {
}

data "azurerm_key_vault_secret" "tfe_license" {
count = var.tfe_license_secret_name == null ? 0 : 1

name = var.tfe_license_secret_name
key_vault_id = var.key_vault_id
}
Expand Down
2 changes: 1 addition & 1 deletion tests/private-tcp-active-active/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ module "private_tcp_active_active" {

# Bootstrapping resources
bypass_preflight_checks = true
tfe_license_secret_id = data.azurerm_key_vault_secret.tfe_license.id
tfe_license_secret_id = var.tfe_license_secret_name == null ? var.tfe_license_secret_name : data.azurerm_key_vault_secret.tfe_license[0].id
vm_certificate_secret = data.azurerm_key_vault_secret.vm_certificate
vm_key_secret = data.azurerm_key_vault_secret.vm_key
tls_bootstrap_cert_pathname = "/var/lib/terraform-enterprise/certificate.pem"
Expand Down
1 change: 1 addition & 0 deletions tests/private-tcp-active-active/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ variable "tfe_image_tag" {
}

variable "tfe_license_secret_name" {
default = null
type = string
description = "Name of the secret under which the Base64 encoded TFE license is stored in the Azure Key Vault"
}
Expand Down
2 changes: 2 additions & 0 deletions tests/public-active-active/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ data "azurerm_key_vault_secret" "vm_key" {
}

data "azurerm_key_vault_secret" "tfe_license" {
count = var.tfe_license_secret_name == null ? 0 : 1

name = var.tfe_license_secret_name
key_vault_id = var.key_vault_id
}
2 changes: 1 addition & 1 deletion tests/public-active-active/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module "public_active_active" {

# Bootstrapping resources
load_balancer_certificate = data.azurerm_key_vault_certificate.load_balancer
tfe_license_secret_id = data.azurerm_key_vault_secret.tfe_license.id
tfe_license_secret_id = var.tfe_license_secret_name == null ? var.tfe_license_secret_name : data.azurerm_key_vault_secret.tfe_license[0].id
vm_certificate_secret = data.azurerm_key_vault_secret.vm_certificate
vm_key_secret = data.azurerm_key_vault_secret.vm_key
tls_bootstrap_cert_pathname = "/var/lib/terraform-enterprise/certificate.pem"
Expand Down
1 change: 1 addition & 0 deletions tests/public-active-active/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ variable "tfe_image_tag" {
}

variable "tfe_license_secret_name" {
default = null
type = string
description = "Name of the secret under which the Base64 encoded TFE license is stored in the Azure Key Vault"
}
Expand Down