From ca9d9984ca009b65b4e986c46fde1637926bc471 Mon Sep 17 00:00:00 2001 From: RMcVelia Date: Fri, 1 Nov 2024 16:54:31 +0000 Subject: [PATCH] WIP --- terraform/aks/config/review.yml | 3 +++ terraform/aks/output.tf | 4 +--- terraform/aks/variables.tf | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 terraform/aks/config/review.yml diff --git a/terraform/aks/config/review.yml b/terraform/aks/config/review.yml new file mode 100644 index 00000000..54a39a1a --- /dev/null +++ b/terraform/aks/config/review.yml @@ -0,0 +1,3 @@ +--- +EXAMPLE_KEY: example.value.1 +EXTERNAL_URL: https://teacher-relocation-payment-pr-447.education.gov.uk diff --git a/terraform/aks/output.tf b/terraform/aks/output.tf index 697fdd1f..4f29a3bd 100644 --- a/terraform/aks/output.tf +++ b/terraform/aks/output.tf @@ -1,13 +1,11 @@ output "url" { value = [ - module.web_application.url, module.web_application.url ] } output "external_urls" { value = [ - module.web_application.url, - module.web_application.url + "${local.external_url}" ] } diff --git a/terraform/aks/variables.tf b/terraform/aks/variables.tf index a3dca977..fc58194d 100644 --- a/terraform/aks/variables.tf +++ b/terraform/aks/variables.tf @@ -53,8 +53,12 @@ locals { infra_secrets = yamldecode(data.azurerm_key_vault_secret.infra_secrets.value) app_config = yamldecode(file(var.app_config_file))[var.environment] + environment_variables = yamldecode(file("${path.module}/config/${var.environment}.yml")) + external_url = try(local.environment_variables["EXTERNAL_URL"], module.web_application.url) + app_env_values = merge( local.app_config, + local.environment_variables, # sslmode not defined in database.yml? { DB_SSLMODE = local.postgres_ssl_mode } )