Skip to content

Commit a70e0e6

Browse files
wip
1 parent 7485205 commit a70e0e6

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

infrastructure/modules/container-apps/postgres.tf

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@
5858
# tags = {}
5959
# }
6060

61-
# module "db_connect_identity" {
62-
# count = var.deploy_database_as_container ? 0 : 1
63-
64-
# source = "../dtos-devops-templates/infrastructure/modules/managed-identity"
65-
# resource_group_name = azurerm_resource_group.main.name
66-
# location = var.region
67-
# uai_name = "mi-${var.app_short_name}-${var.environment}-db-connect"
68-
# }
61+
module "db_connect_identity" {
62+
count = var.deploy_database_as_container ? 0 : 1
63+
64+
source = "../dtos-devops-templates/infrastructure/modules/managed-identity"
65+
resource_group_name = azurerm_resource_group.main.name
66+
location = var.region
67+
uai_name = "mi-${var.app_short_name}-${var.environment}-db-connect"
68+
}
6969

7070
# resource "random_password" "admin_password" {
7171
# count = var.deploy_database_as_container ? 1 : 0

infrastructure/modules/container-apps/variables.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,12 @@ locals {
173173
DATABASE_PORT = local.database_port
174174
}
175175

176-
azure_db_env = {
177-
AZURE_CLIENT_ID = var.deploy_database_as_container ? null : module.db_connect_identity[0].client_id
178-
DATABASE_HOST = var.deploy_database_as_container ? null : module.postgres[0].host
179-
DATABASE_NAME = var.deploy_database_as_container ? null : module.postgres[0].database_names[0]
180-
DATABASE_USER = var.deploy_database_as_container ? null : module.db_connect_identity[0].name
181-
}
176+
# azure_db_env = {
177+
# AZURE_CLIENT_ID = var.deploy_database_as_container ? null : module.db_connect_identity[0].client_id
178+
# DATABASE_HOST = var.deploy_database_as_container ? null : module.postgres[0].host
179+
# DATABASE_NAME = var.deploy_database_as_container ? null : module.postgres[0].database_names[0]
180+
# DATABASE_USER = var.deploy_database_as_container ? null : module.db_connect_identity[0].name
181+
# }
182182

183183
storage_account_name = "st${var.app_short_name}${var.environment}uks"
184184
storage_containers = {}

0 commit comments

Comments
 (0)