From a661fcc4e1a95c7eb696202bca86319e2ac0552a Mon Sep 17 00:00:00 2001 From: Erika Gressi Date: Mon, 19 Dec 2022 19:46:37 +0100 Subject: [PATCH 1/2] update gallery app readme --- .../galleries/applications/readme.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/Microsoft.Compute/galleries/applications/readme.md b/modules/Microsoft.Compute/galleries/applications/readme.md index 8fcc2e4951..5ef46ce8b5 100644 --- a/modules/Microsoft.Compute/galleries/applications/readme.md +++ b/modules/Microsoft.Compute/galleries/applications/readme.md @@ -1,4 +1,4 @@ -# Application `[Microsoft.Compute/galleries/application]` +# Application `[Microsoft.Compute/galleries/applications]` This module deploys an Application in a Azure Compute Gallery. @@ -34,18 +34,19 @@ This module deploys an Application in a Azure Compute Gallery. | Parameter Name | Type | Default Value | Allowed Values | Description | | :-- | :-- | :-- | :-- | :-- | -| `applicationDefinitionDescription` | string | `''` | | The description of this gallery Application resource. This property is updatable. | +| `applicationDefinitionDescription` | string | `''` | | The description of this gallery Application Definition resource. This property is updatable. | | `customActions` | object | `{object}` | | A list of custom actions that can be performed with all of the Gallery Application Versions within this Gallery Application. | | `enableDefaultTelemetry` | bool | `True` | | Enable telemetry via a Globally Unique Identifier (GUID). | -| `endOfLife` | string | `''` | | The end of life date of the gallery Application. This property can be used for decommissioning purposes. This property is updatable. Allowed format: 2020-01-10T23:00:00.000Z. | -| `eula` | string | `''` | | The Eula agreement for the gallery Application. Has to be a valid URL. | +| `endOfLifeDate` | string | `''` | | The end of life date of the gallery Image Definition. This property can be used for decommissioning purposes. This property is updatable. Allowed format: 2020-01-10T23:00:00.000Z. | +| `eula` | string | `''` | | The Eula agreement for the gallery Application Definition. Has to be a valid URL. | | `location` | string | `[resourceGroup().location]` | | Location for all resources. | | `privacyStatementUri` | string | `''` | | The privacy statement uri. Has to be a valid URL. | | `releaseNoteUri` | string | `''` | | The release note uri. Has to be a valid URL. | | `roleAssignments` | array | `[]` | | Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. | -| `supportedOSType` | string | `'Windows'` | `[Linux, Windows]` | Supported OS type of the application. | +| `supportedOSType` | string | `'Windows'` | `[Linux, Windows]` | This property allows you to specify the supported type of the OS that application is built for. | | `tags` | object | `{object}` | | Tags for all resources. | + ### Parameter Usage: `roleAssignments` Create a role assignment for the given resource. If you want to assign a service principal / managed identity that is created in the same deployment, make sure to also specify the `'principalType'` parameter and set it to `'ServicePrincipal'`. This will ensure the role assignment waits for the principal's propagation in Azure. @@ -144,6 +145,8 @@ tags: { ``` +

+

### Parameter Usage: `customActions` From c2fadd5601d30495f1750a8f85c6d04cb1e6e166 Mon Sep 17 00:00:00 2001 From: Erika Gressi Date: Mon, 19 Dec 2022 20:14:29 +0100 Subject: [PATCH 2/2] update customAction type --- .../galleries/.test/common/deploy.test.bicep | 2 +- modules/Microsoft.Compute/galleries/applications/deploy.bicep | 4 ++-- modules/Microsoft.Compute/galleries/applications/readme.md | 2 +- modules/Microsoft.Compute/galleries/readme.md | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/Microsoft.Compute/galleries/.test/common/deploy.test.bicep b/modules/Microsoft.Compute/galleries/.test/common/deploy.test.bicep index 97fe520939..090a1bdab5 100644 --- a/modules/Microsoft.Compute/galleries/.test/common/deploy.test.bicep +++ b/modules/Microsoft.Compute/galleries/.test/common/deploy.test.bicep @@ -60,7 +60,7 @@ module testDeployment '../../deploy.bicep' = { name: '<>-${serviceShort}-appd-001' } { - name: '<>-appd-002' + name: '<>-${serviceShort}-appd-002' supportedOSType: 'Windows' roleAssignments: [ { diff --git a/modules/Microsoft.Compute/galleries/applications/deploy.bicep b/modules/Microsoft.Compute/galleries/applications/deploy.bicep index 9942ddea62..7cde02ecc0 100644 --- a/modules/Microsoft.Compute/galleries/applications/deploy.bicep +++ b/modules/Microsoft.Compute/galleries/applications/deploy.bicep @@ -40,7 +40,7 @@ param roleAssignments array = [] param tags object = {} @description('Optional. A list of custom actions that can be performed with all of the Gallery Application Versions within this Gallery Application.') -param customActions object = {} +param customActions array = [] resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) { name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}' @@ -64,7 +64,7 @@ resource application 'Microsoft.Compute/galleries/applications@2022-03-03' = { location: location tags: tags properties: { - customActions: !empty(customActions) ? [ customActions ] : null + customActions: !empty(customActions) ? customActions : null description: applicationDefinitionDescription endOfLifeDate: endOfLifeDate eula: eula diff --git a/modules/Microsoft.Compute/galleries/applications/readme.md b/modules/Microsoft.Compute/galleries/applications/readme.md index 5ef46ce8b5..7c5cae7e98 100644 --- a/modules/Microsoft.Compute/galleries/applications/readme.md +++ b/modules/Microsoft.Compute/galleries/applications/readme.md @@ -35,7 +35,7 @@ This module deploys an Application in a Azure Compute Gallery. | Parameter Name | Type | Default Value | Allowed Values | Description | | :-- | :-- | :-- | :-- | :-- | | `applicationDefinitionDescription` | string | `''` | | The description of this gallery Application Definition resource. This property is updatable. | -| `customActions` | object | `{object}` | | A list of custom actions that can be performed with all of the Gallery Application Versions within this Gallery Application. | +| `customActions` | array | `[]` | | A list of custom actions that can be performed with all of the Gallery Application Versions within this Gallery Application. | | `enableDefaultTelemetry` | bool | `True` | | Enable telemetry via a Globally Unique Identifier (GUID). | | `endOfLifeDate` | string | `''` | | The end of life date of the gallery Image Definition. This property can be used for decommissioning purposes. This property is updatable. Allowed format: 2020-01-10T23:00:00.000Z. | | `eula` | string | `''` | | The Eula agreement for the gallery Application Definition. Has to be a valid URL. | diff --git a/modules/Microsoft.Compute/galleries/readme.md b/modules/Microsoft.Compute/galleries/readme.md index a290fd3a31..b3b1593f3d 100644 --- a/modules/Microsoft.Compute/galleries/readme.md +++ b/modules/Microsoft.Compute/galleries/readme.md @@ -180,7 +180,7 @@ module galleries './Microsoft.Compute/galleries/deploy.bicep' = { name: '<>-cgcom-appd-001' } { - name: '<>-appd-002' + name: '<>-cgcom-appd-002' roleAssignments: [ { principalIds: [ @@ -231,7 +231,7 @@ module galleries './Microsoft.Compute/galleries/deploy.bicep' = { "name": "<>-cgcom-appd-001" }, { - "name": "<>-appd-002", + "name": "<>-cgcom-appd-002", "roleAssignments": [ { "principalIds": [