Skip to content

Commit

Permalink
update resource name for managed identity
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasisnes committed Oct 8, 2024
1 parent fef1f45 commit b521f73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions infra/deploy/altinn-register/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ resource "azurerm_resource_group" "rg" {
tags = local.metadata
}

resource "azurerm_user_assigned_identity" "mi" {
resource "azurerm_user_assigned_identity" "managed_identity" {
name = "mi${local.metadata.suffix}"
resource_group_name = azurerm_resource_group.rg.name
location = var.location
Expand All @@ -86,15 +86,15 @@ resource "azurerm_user_assigned_identity" "mi" {
}

resource "azurerm_role_assignment" "mass_transit_role" {
principal_id = azurerm_user_assigned_identity.mi.principal_id
principal_id = azurerm_user_assigned_identity.managed_identity.principal_id
scope = data.azurerm_servicebus_namespace.sb.id
principal_type = "ServicePrincipal"
skip_service_principal_aad_check = true
role_definition_name = "Azure Service Bus Mass Transit"
}

resource "azurerm_role_assignment" "key_vault_secret_reader" {
principal_id = azurerm_user_assigned_identity.mi.principal_id
principal_id = azurerm_user_assigned_identity.managed_identity.principal_id
scope = module.key_vault.id
principal_type = "ServicePrincipal"
skip_service_principal_aad_check = true
Expand Down
1 change: 0 additions & 1 deletion infra/modules/container_app_api/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ resource "azurerm_role_assignment" "rbac" {
role_definition_name = each.value.role_definition_name
scope = each.value.scope

condition_version = var.can_use_auth_app_configuration
for_each = { for arm in [
{
id = "service_bus_mass_transit"
Expand Down

0 comments on commit b521f73

Please sign in to comment.