diff --git a/infrastructure/environments/poc/variables.sh b/infrastructure/environments/poc/variables.sh index f3b37dd9..83cecc05 100644 --- a/infrastructure/environments/poc/variables.sh +++ b/infrastructure/environments/poc/variables.sh @@ -3,7 +3,7 @@ ENV_CONFIG=poc AZURE_SUBSCRIPTION="Lung Cancer Screening - Dev" HUB_SUBSCRIPTION="Lung Cancer Screening - Dev" STORAGE_ACCOUNT_RG=rg-tfstate-poc-uks -TERRAFORM_MODULES_REF=feat/public-container-app-env +TERRAFORM_MODULES_REF=main ENABLE_SOFT_DELETE=false DOCKER_IMAGE=docker.io/nginxdemos/hello DOCKER_IMAGE_TAG=latest diff --git a/infrastructure/environments/poc/variables.tfvars b/infrastructure/environments/poc/variables.tfvars index 31233e81..1278a3fa 100644 --- a/infrastructure/environments/poc/variables.tfvars +++ b/infrastructure/environments/poc/variables.tfvars @@ -1,4 +1,4 @@ -deploy_database_as_container = true +deploy_database_as_container = false features = { front_door = false hub_and_spoke = false diff --git a/infrastructure/modules/container-apps/data.tf b/infrastructure/modules/container-apps/data.tf index 4c90b849..bbbe2def 100644 --- a/infrastructure/modules/container-apps/data.tf +++ b/infrastructure/modules/container-apps/data.tf @@ -1,8 +1,8 @@ data "azurerm_client_config" "current" {} -# data "azuread_group" "postgres_sql_admin_group" { -# display_name = var.postgres_sql_admin_group -# } +data "azuread_group" "postgres_sql_admin_group" { + display_name = var.postgres_sql_admin_group +} data "azurerm_private_dns_zone" "storage" { count = var.features.private_networking ? 1 : 0 diff --git a/infrastructure/modules/container-apps/output.tf b/infrastructure/modules/container-apps/output.tf index 15d19fe0..035d3c87 100644 --- a/infrastructure/modules/container-apps/output.tf +++ b/infrastructure/modules/container-apps/output.tf @@ -3,5 +3,5 @@ output "internal_url" { } output "external_url" { - value = var.features.front_door ? "https://${module.frontdoor_endpoint.custom_domains["${var.environment}-domain"].host_name}/" : null + value = var.features.front_door ? "https://${module.frontdoor_endpoint[0].custom_domains["${var.environment}-domain"].host_name}/" : null } diff --git a/infrastructure/modules/container-apps/postgres.tf b/infrastructure/modules/container-apps/postgres.tf index eaa42924..5ea526db 100644 --- a/infrastructure/modules/container-apps/postgres.tf +++ b/infrastructure/modules/container-apps/postgres.tf @@ -20,7 +20,7 @@ module "postgres" { backup_retention_days = var.postgres_backup_retention_days geo_redundant_backup_enabled = var.postgres_geo_redundant_backup_enabled - postgresql_admin_object_id = "" #data.azuread_group.postgres_sql_admin_group.object_id + postgresql_admin_object_id = data.azuread_group.postgres_sql_admin_group.object_id postgresql_admin_principal_name = var.postgres_sql_admin_group postgresql_admin_principal_type = "Group" administrator_login = local.database_user diff --git a/infrastructure/terraform/main.tf b/infrastructure/terraform/main.tf index 4c1e1954..661505c0 100644 --- a/infrastructure/terraform/main.tf +++ b/infrastructure/terraform/main.tf @@ -47,12 +47,11 @@ module "container-apps" { postgres_backup_retention_days = var.postgres_backup_retention_days postgres_geo_redundant_backup_enabled = var.postgres_geo_redundant_backup_enabled postgres_sku_name = var.postgres_sku_name - # postgres_sql_admin_group = "postgres_${var.app_short_name}_${var.env_config}_uks_admin" - postgres_sql_admin_group = "Azure-Lung-Cancer-Screening---Dev-Owner" - postgres_storage_mb = var.postgres_storage_mb - postgres_storage_tier = var.postgres_storage_tier - postgres_subnet_id = var.deploy_infra ? module.infra[0].postgres_subnet_id : data.azurerm_subnet.postgres[0].id - main_subnet_id = var.deploy_infra ? module.infra[0].main_subnet_id : data.azurerm_subnet.main[0].id - seed_demo_data = var.seed_demo_data - use_apex_domain = var.use_apex_domain + postgres_sql_admin_group = "postgres_${var.app_short_name}_${var.env_config}_uks_admin" + postgres_storage_mb = var.postgres_storage_mb + postgres_storage_tier = var.postgres_storage_tier + postgres_subnet_id = var.deploy_infra ? module.infra[0].postgres_subnet_id : data.azurerm_subnet.postgres[0].id + main_subnet_id = var.deploy_infra ? module.infra[0].main_subnet_id : data.azurerm_subnet.main[0].id + seed_demo_data = var.seed_demo_data + use_apex_domain = var.use_apex_domain }