diff --git a/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/CommonDefinitions.json b/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/CommonDefinitions.json index a5a8f9951a7a..99208c7eb1a2 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/CommonDefinitions.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/CommonDefinitions.json @@ -1253,6 +1253,34 @@ "type": "string" } } + }, + "IdentitySettings": { + "description": "Optional settings for a Managed Identity that is assigned to the Container App.", + "type": "object", + "required": [ + "identity" + ], + "properties": { + "identity": { + "description": "The resource ID of a user-assigned managed identity that is assigned to the Container App, or 'system' for system-assigned identity.", + "type": "string" + }, + "lifecycle": { + "description": "Use to select the lifecycle stages of a Container App during which the Managed Identity should be available.", + "enum": [ + "Init", + "Main", + "None", + "All" + ], + "type": "string", + "default": "All", + "x-ms-enum": { + "name": "IdentitySettingsLifeCycle", + "modelAsString": true + } + } + } } }, "securityDefinitions": { diff --git a/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/ContainerApps.json b/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/ContainerApps.json index 64680e59576e..4d13deec8bb0 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/ContainerApps.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/ContainerApps.json @@ -661,6 +661,16 @@ "service": { "$ref": "#/definitions/Service", "description": "Container App to be a dev Container App Service" + }, + "identitySettings": { + "description": "Optional settings for Managed Identities that are assigned to the Container App. If a Managed Identity is not specified here, default settings will be used.", + "type": "array", + "items": { + "$ref": "./CommonDefinitions.json#/definitions/IdentitySettings" + }, + "x-ms-identifiers": [ + "identity" + ] } } }, diff --git a/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/Jobs.json b/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/Jobs.json index 7dafd1a62b8c..5b8c52a6b695 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/Jobs.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/Jobs.json @@ -742,6 +742,16 @@ "x-ms-identifiers": [ "server" ] + }, + "identitySettings": { + "description": "Optional settings for Managed Identities that are assigned to the Container App Job. If a Managed Identity is not specified here, default settings will be used.", + "type": "array", + "items": { + "$ref": "./CommonDefinitions.json#/definitions/IdentitySettings" + }, + "x-ms-identifiers": [ + "identity" + ] } } }, diff --git a/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_CreateOrUpdate.json index 9b231c3c0a40..a1c6842427e3 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_CreateOrUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_CreateOrUpdate.json @@ -6,6 +6,12 @@ "api-version": "2025-01-01", "containerAppEnvelope": { "location": "East US", + "identity": { + "type": "SystemAssigned,UserAssigned", + "userAssignedIdentities": { + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity": {} + } + }, "properties": { "environmentId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", "workloadProfileName": "My-GP-01", @@ -99,7 +105,17 @@ "java": { "enableMetrics": true } - } + }, + "identitySettings": [ + { + "identity": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity", + "lifecycle": "All" + }, + { + "identity": "system", + "lifecycle": "Init" + } + ] }, "template": { "containers": [ @@ -222,6 +238,17 @@ "name": "testcontainerapp0", "type": "Microsoft.App/containerApps", "location": "East US", + "identity": { + "type": "SystemAssigned,UserAssigned", + "principalId": "24adfa4f-dedf-8dc0-ca29-b6d1a69ab319", + "tenantId": "23adfa4f-eedf-1dc0-ba29-a6d1a69ab3d0", + "userAssignedIdentities": { + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity": { + "principalId": "74adfa4f-dedf-8dc0-ca29-b6d1a69ab312", + "clientId": "14adfa4f-eedf-1dc0-ba29-a6d1a69ab3df" + } + } + }, "properties": { "provisioningState": "Succeeded", "runningStatus": "Running", @@ -286,7 +313,17 @@ "java": { "enableMetrics": true } - } + }, + "identitySettings": [ + { + "identity": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity", + "lifecycle": "All" + }, + { + "identity": "system", + "lifecycle": "Init" + } + ] }, "template": { "containers": [ @@ -406,6 +443,17 @@ "name": "testcontainerapp0", "type": "Microsoft.App/containerApps", "location": "East US", + "identity": { + "type": "SystemAssigned,UserAssigned", + "principalId": "24adfa4f-dedf-8dc0-ca29-b6d1a69ab319", + "tenantId": "23adfa4f-eedf-1dc0-ba29-a6d1a69ab3d0", + "userAssignedIdentities": { + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity": { + "principalId": "74adfa4f-dedf-8dc0-ca29-b6d1a69ab312", + "clientId": "14adfa4f-eedf-1dc0-ba29-a6d1a69ab3df" + } + } + }, "properties": { "provisioningState": "InProgress", "runningStatus": "Running", @@ -439,7 +487,17 @@ "java": { "enableMetrics": true } - } + }, + "identitySettings": [ + { + "identity": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity", + "lifecycle": "All" + }, + { + "identity": "system", + "lifecycle": "Init" + } + ] }, "template": { "containers": [ diff --git a/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_Get.json b/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_Get.json index 3d897f3187d3..0866f58eb809 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_Get.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_Get.json @@ -13,6 +13,17 @@ "name": "testcontainerapp0", "type": "Microsoft.App/containerApps", "location": "East US", + "identity": { + "type": "SystemAssigned,UserAssigned", + "principalId": "24adfa4f-dedf-8dc0-ca29-b6d1a69ab319", + "tenantId": "23adfa4f-eedf-1dc0-ba29-a6d1a69ab3d0", + "userAssignedIdentities": { + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity": { + "principalId": "74adfa4f-dedf-8dc0-ca29-b6d1a69ab312", + "clientId": "14adfa4f-eedf-1dc0-ba29-a6d1a69ab3df" + } + } + }, "properties": { "provisioningState": "Succeeded", "runningStatus": "Running", @@ -84,7 +95,17 @@ "maxInactiveRevisions": 10, "service": { "type": "redis" - } + }, + "identitySettings": [ + { + "identity": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity", + "lifecycle": "All" + }, + { + "identity": "system", + "lifecycle": "Init" + } + ] }, "template": { "containers": [ diff --git a/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_CreateorUpdate.json b/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_CreateorUpdate.json index 7e3cca855413..14a061bb6a36 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_CreateorUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_CreateorUpdate.json @@ -6,6 +6,12 @@ "api-version": "2025-01-01", "JobEnvelope": { "location": "East US", + "identity": { + "type": "SystemAssigned,UserAssigned", + "userAssignedIdentities": { + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity": {} + } + }, "properties": { "environmentId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", "configuration": { @@ -15,7 +21,17 @@ "replicaCompletionCount": 1, "parallelism": 4 }, - "triggerType": "Manual" + "triggerType": "Manual", + "identitySettings": [ + { + "identity": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity", + "lifecycle": "All" + }, + { + "identity": "system", + "lifecycle": "Init" + } + ] }, "template": { "containers": [ @@ -94,6 +110,17 @@ "name": "testcontainerappsjob0", "type": "Microsoft.App/jobs", "location": "East US", + "identity": { + "type": "SystemAssigned,UserAssigned", + "principalId": "24adfa4f-dedf-8dc0-ca29-b6d1a69ab319", + "tenantId": "23adfa4f-eedf-1dc0-ba29-a6d1a69ab3d0", + "userAssignedIdentities": { + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity": { + "principalId": "74adfa4f-dedf-8dc0-ca29-b6d1a69ab312", + "clientId": "14adfa4f-eedf-1dc0-ba29-a6d1a69ab3df" + } + } + }, "properties": { "provisioningState": "InProgress", "environmentId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", @@ -104,7 +131,17 @@ "replicaCompletionCount": 1, "parallelism": 4 }, - "triggerType": "Manual" + "triggerType": "Manual", + "identitySettings": [ + { + "identity": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity", + "lifecycle": "All" + }, + { + "identity": "system", + "lifecycle": "Init" + } + ] }, "template": { "containers": [ @@ -189,6 +226,17 @@ "name": "testcontainerappsjob0", "type": "Microsoft.App/jobs", "location": "East US", + "identity": { + "type": "SystemAssigned,UserAssigned", + "principalId": "24adfa4f-dedf-8dc0-ca29-b6d1a69ab319", + "tenantId": "23adfa4f-eedf-1dc0-ba29-a6d1a69ab3d0", + "userAssignedIdentities": { + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity": { + "principalId": "74adfa4f-dedf-8dc0-ca29-b6d1a69ab312", + "clientId": "14adfa4f-eedf-1dc0-ba29-a6d1a69ab3df" + } + } + }, "properties": { "provisioningState": "InProgress", "environmentId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", @@ -199,7 +247,17 @@ "replicaCompletionCount": 1, "parallelism": 4 }, - "triggerType": "Manual" + "triggerType": "Manual", + "identitySettings": [ + { + "identity": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity", + "lifecycle": "All" + }, + { + "identity": "system", + "lifecycle": "Init" + } + ] }, "template": { "containers": [ diff --git a/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_Get.json b/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_Get.json index 6f20aadf1274..ea414322a275 100644 --- a/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_Get.json +++ b/specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_Get.json @@ -13,6 +13,17 @@ "name": "testcontainerappsjob0", "type": "Microsoft.App/jobs", "location": "East US", + "identity": { + "type": "SystemAssigned,UserAssigned", + "principalId": "24adfa4f-dedf-8dc0-ca29-b6d1a69ab319", + "tenantId": "23adfa4f-eedf-1dc0-ba29-a6d1a69ab3d0", + "userAssignedIdentities": { + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity": { + "principalId": "74adfa4f-dedf-8dc0-ca29-b6d1a69ab312", + "clientId": "14adfa4f-eedf-1dc0-ba29-a6d1a69ab3df" + } + } + }, "properties": { "provisioningState": "Succeeded", "environmentId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", @@ -23,7 +34,17 @@ "replicaCompletionCount": 1, "parallelism": 4 }, - "triggerType": "Manual" + "triggerType": "Manual", + "identitySettings": [ + { + "identity": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity", + "lifecycle": "All" + }, + { + "identity": "system", + "lifecycle": "Init" + } + ] }, "template": { "containers": [