File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22resource "azurerm_role_assignment" "kv_secrets_camcp" {
33 scope = azurerm_key_vault. main . id
44 role_definition_name = " Key Vault Secrets User"
5- principal_id = azurerm_container_app. mcp . identity [0 ]. principal_id
5+ principal_id = azurerm_user_assigned_identity. mcp . principal_id
6+ }
7+
8+ # User Assigned Managed Identity for Backend Container App
9+ resource "azurerm_user_assigned_identity" "mcp" {
10+ name = " uami-mcp-${ var . iteration } "
11+ resource_group_name = azurerm_resource_group. rg . name
12+ location = azurerm_resource_group. rg . location
613}
714
815resource "azurerm_container_app" "mcp" {
916 name = " ca-mcp-${ var . iteration } "
1017 container_app_environment_id = azurerm_container_app_environment. cae . id
1118 resource_group_name = azurerm_resource_group. rg . name
1219 revision_mode = " Single"
13-
20+
1421 identity {
15- type = " SystemAssigned"
22+ type = " UserAssigned"
23+ identity_ids = [azurerm_user_assigned_identity . mcp . id ]
1624 }
1725
18-
1926 ingress {
2027 target_port = 8000
2128 external_enabled = true
You can’t perform that action at this time.
0 commit comments