From 4e9816ae95742ccdeac8cbfc99f6599e0b49b125 Mon Sep 17 00:00:00 2001 From: Andreas Isnes Date: Tue, 8 Oct 2024 17:11:33 +0200 Subject: [PATCH] update template container app and api template --- infra/modules/container_app/main.tf | 11 ++--------- .../Altinn.Authorization.DeployApi/deploy/main.tf | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/infra/modules/container_app/main.tf b/infra/modules/container_app/main.tf index 9b31c318..d84399ae 100644 --- a/infra/modules/container_app/main.tf +++ b/infra/modules/container_app/main.tf @@ -103,11 +103,8 @@ resource "azurerm_container_app" "app" { workload_profile_name = "basic" identity { - type = "UserAssigned" - identity_ids = [ - azurerm_user_assigned_identity.app.id, - data.azurerm_user_assigned_identity.postgres_admin.id - ] + type = "UserAssigned" + identity_ids = [azurerm_user_assigned_identity.app.id] } ingress { @@ -127,10 +124,6 @@ resource "azurerm_container_app" "app" { max_replicas = var.max_replicas container { - env { - name = "EntraId__Identities__PostgresAdmin__ClientId" - value = data.azurerm_user_assigned_identity.postgres_admin.client_id - } env { name = "EntraId__Identities__Service__ClientId" value = azurerm_user_assigned_identity.app.client_id diff --git a/src/apps/Altinn.Authorization.DeployApi/deploy/main.tf b/src/apps/Altinn.Authorization.DeployApi/deploy/main.tf index c6cb89af..11ea1b43 100644 --- a/src/apps/Altinn.Authorization.DeployApi/deploy/main.tf +++ b/src/apps/Altinn.Authorization.DeployApi/deploy/main.tf @@ -28,7 +28,7 @@ data "azurerm_user_assigned_identity" "application_admin" { module "app" { source = "../../../../infra/modules/container_app_api" - user_assigned_identities = [data.azurerm_user_assigned_identity.application_admin.principal_id] + user_assigned_identities = [data.azurerm_user_assigned_identity.application_admin.id] instance = var.instance environment = var.environment