Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The galleries/applications/versions resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Compute/galleries/applications/versions resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Compute/galleries/applications/versions@2024-03-03' = {
parent: resourceSymbolicName
___location: 'string'
name: 'string'
properties: {
publishingProfile: {
advancedSettings: {
{customized property}: 'string'
}
customActions: [
{
description: 'string'
name: 'string'
parameters: [
{
defaultValue: 'string'
description: 'string'
name: 'string'
required: bool
type: 'string'
}
]
script: 'string'
}
]
enableHealthCheck: bool
endOfLifeDate: 'string'
excludeFromLatest: bool
manageActions: {
install: 'string'
remove: 'string'
update: 'string'
}
replicaCount: int
replicationMode: 'string'
settings: {
configFileName: 'string'
packageFileName: 'string'
scriptBehaviorAfterReboot: 'string'
}
source: {
defaultConfigurationLink: 'string'
mediaLink: 'string'
}
storageAccountType: 'string'
targetExtendedLocations: [
{
encryption: {
dataDiskImages: [
{
diskEncryptionSetId: 'string'
lun: int
}
]
osDiskImage: {
diskEncryptionSetId: 'string'
securityProfile: {
confidentialVMEncryptionType: 'string'
secureVMDiskEncryptionSetId: 'string'
}
}
}
extendedLocation: {
name: 'string'
type: 'string'
}
extendedLocationReplicaCount: int
name: 'string'
storageAccountType: 'string'
}
]
targetRegions: [
{
additionalReplicaSets: [
{
regionalReplicaCount: int
storageAccountType: 'string'
}
]
encryption: {
dataDiskImages: [
{
diskEncryptionSetId: 'string'
lun: int
}
]
osDiskImage: {
diskEncryptionSetId: 'string'
securityProfile: {
confidentialVMEncryptionType: 'string'
secureVMDiskEncryptionSetId: 'string'
}
}
}
excludeFromLatest: bool
name: 'string'
regionalReplicaCount: int
storageAccountType: 'string'
}
]
}
safetyProfile: {
allowDeletionOfReplicatedLocations: bool
}
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.Compute/galleries/applications/versions
| Name | Description | Value |
|---|---|---|
| ___location | The geo-___location where the resource lives | string (required) |
| name | The resource name | string (required) |
| parent | In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource. For more information, see Child resource outside parent resource. |
Symbolic name for resource of type: galleries/applications |
| properties | Describes the properties of a gallery image version. | GalleryApplicationVersionProperties |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
AdditionalReplicaSet
| Name | Description | Value |
|---|---|---|
| regionalReplicaCount | The number of direct drive replicas of the Image Version to be created.This Property is updatable | int |
| storageAccountType | Specifies the storage account type to be used to create the direct drive replicas | 'PremiumV2_LRS' 'Premium_LRS' 'Standard_LRS' 'Standard_ZRS' |
DataDiskImageEncryption
| Name | Description | Value |
|---|---|---|
| diskEncryptionSetId | A relative URI containing the resource ID of the disk encryption set. | string |
| lun | This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine. | int (required) |
EncryptionImages
| Name | Description | Value |
|---|---|---|
| dataDiskImages | A list of encryption specifications for data disk images. | DataDiskImageEncryption[] |
| osDiskImage | Contains encryption settings for an OS disk image. | OSDiskImageEncryption |
GalleryApplicationCustomAction
| Name | Description | Value |
|---|---|---|
| description | Description to help the users understand what this custom action does. | string |
| name | The name of the custom action. Must be unique within the Gallery Application Version. | string (required) |
| parameters | The parameters that this custom action uses | GalleryApplicationCustomActionParameter[] |
| script | The script to run when executing this custom action. | string (required) |
GalleryApplicationCustomActionParameter
| Name | Description | Value |
|---|---|---|
| defaultValue | The default value of the parameter. Only applies to string types | string |
| description | A description to help users understand what this parameter means | string |
| name | The name of the custom action. Must be unique within the Gallery Application Version. | string (required) |
| required | Indicates whether this parameter must be passed when running the custom action. | bool |
| type | Specifies the type of the custom action parameter. Possible values are: String, ConfigurationDataBlob or LogOutputBlob | 'ConfigurationDataBlob' 'LogOutputBlob' 'String' |
GalleryApplicationVersionProperties
| Name | Description | Value |
|---|---|---|
| publishingProfile | The publishing profile of a gallery image version. | GalleryApplicationVersionPublishingProfile (required) |
| safetyProfile | The safety profile of the Gallery Application Version. | GalleryApplicationVersionSafetyProfile |
GalleryApplicationVersionPublishingProfile
| Name | Description | Value |
|---|---|---|
| advancedSettings | Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. | GalleryApplicationVersionPublishingProfileAdvancedSettings |
| customActions | A list of custom actions that can be performed with this Gallery Application Version. | GalleryApplicationCustomAction[] |
| enableHealthCheck | Optional. Whether or not this application reports health. | bool |
| endOfLifeDate | The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property is updatable. | string |
| excludeFromLatest | If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. | bool |
| manageActions | UserArtifactManage | |
| replicaCount | The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable. | int |
| replicationMode | Optional parameter which specifies the mode to be used for replication. This property is not updatable. | 'Full' 'Shallow' |
| settings | Additional settings for the VM app that contains the target package and config file name when it is deployed to target VM or VM scale set. | UserArtifactSettings |
| source | The source image from which the Image Version is going to be created. | UserArtifactSource (required) |
| storageAccountType | Specifies the storage account type to be used to store the image. This property is not updatable. | 'PremiumV2_LRS' 'Premium_LRS' 'Standard_LRS' 'Standard_ZRS' |
| targetExtendedLocations | The target extended locations where the Image Version is going to be replicated to. This property is updatable. | GalleryTargetExtendedLocation[] |
| targetRegions | The target regions where the Image Version is going to be replicated to. This property is updatable. | TargetRegion[] |
GalleryApplicationVersionPublishingProfileAdvancedSettings
| Name | Description | Value |
|---|
GalleryApplicationVersionSafetyProfile
| Name | Description | Value |
|---|---|---|
| allowDeletionOfReplicatedLocations | Indicates whether or not removing this Gallery Image Version from replicated regions is allowed. | bool |
GalleryExtendedLocation
| Name | Description | Value |
|---|---|---|
| name | string | |
| type | It is type of the extended ___location. | 'EdgeZone' 'Unknown' |
GalleryTargetExtendedLocation
| Name | Description | Value |
|---|---|---|
| encryption | Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. | EncryptionImages |
| extendedLocation | The name of the extended ___location. | GalleryExtendedLocation |
| extendedLocationReplicaCount | The number of replicas of the Image Version to be created per extended ___location. This property is updatable. | int |
| name | The name of the region. | string |
| storageAccountType | Specifies the storage account type to be used to store the image. This property is not updatable. | 'Premium_LRS' 'StandardSSD_LRS' 'Standard_LRS' 'Standard_ZRS' |
OSDiskImageEncryption
| Name | Description | Value |
|---|---|---|
| diskEncryptionSetId | A relative URI containing the resource ID of the disk encryption set. | string |
| securityProfile | This property specifies the security profile of an OS disk image. | OSDiskImageSecurityProfile |
OSDiskImageSecurityProfile
| Name | Description | Value |
|---|---|---|
| confidentialVMEncryptionType | confidential VM encryption types | 'EncryptedVMGuestStateOnlyWithPmk' 'EncryptedWithCmk' 'EncryptedWithPmk' 'NonPersistedTPM' |
| secureVMDiskEncryptionSetId | secure VM disk encryption set id | string |
TargetRegion
| Name | Description | Value |
|---|---|---|
| additionalReplicaSets | List of storage sku with replica count to create direct drive replicas. | AdditionalReplicaSet[] |
| encryption | Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. | EncryptionImages |
| excludeFromLatest | Contains the flag setting to hide an image when users specify version='latest' | bool |
| name | The name of the region. | string (required) |
| regionalReplicaCount | The number of replicas of the Image Version to be created per region. This property is updatable. | int |
| storageAccountType | Specifies the storage account type to be used to store the image. This property is not updatable. | 'PremiumV2_LRS' 'Premium_LRS' 'Standard_LRS' 'Standard_ZRS' |
TrackedResourceTags
| Name | Description | Value |
|---|
UserArtifactManage
| Name | Description | Value |
|---|---|---|
| install | Required. The path and arguments to install the gallery application. This is limited to 4096 characters. | string (required) |
| remove | Required. The path and arguments to remove the gallery application. This is limited to 4096 characters. | string (required) |
| update | Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke remove command on the previous version and install command on the current version of the gallery application. This is limited to 4096 characters. | string |
UserArtifactSettings
| Name | Description | Value |
|---|---|---|
| configFileName | Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, the config file will be named the Gallery Application name appended with "_config". | string |
| packageFileName | Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, the package file will be named the same as the Gallery Application name. | string |
| scriptBehaviorAfterReboot | Optional. The action to be taken with regards to install/update/remove of the gallery application in the event of a reboot. | 'None' 'Rerun' |
UserArtifactSource
| Name | Description | Value |
|---|---|---|
| defaultConfigurationLink | Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob. | string |
| mediaLink | Required. The mediaLink of the artifact, must be a readable storage page blob. | string (required) |
ARM template resource definition
The galleries/applications/versions resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Compute/galleries/applications/versions resource, add the following JSON to your template.
{
"type": "Microsoft.Compute/galleries/applications/versions",
"apiVersion": "2024-03-03",
"name": "string",
"___location": "string",
"properties": {
"publishingProfile": {
"advancedSettings": {
"{customized property}": "string"
},
"customActions": [
{
"description": "string",
"name": "string",
"parameters": [
{
"defaultValue": "string",
"description": "string",
"name": "string",
"required": "bool",
"type": "string"
}
],
"script": "string"
}
],
"enableHealthCheck": "bool",
"endOfLifeDate": "string",
"excludeFromLatest": "bool",
"manageActions": {
"install": "string",
"remove": "string",
"update": "string"
},
"replicaCount": "int",
"replicationMode": "string",
"settings": {
"configFileName": "string",
"packageFileName": "string",
"scriptBehaviorAfterReboot": "string"
},
"source": {
"defaultConfigurationLink": "string",
"mediaLink": "string"
},
"storageAccountType": "string",
"targetExtendedLocations": [
{
"encryption": {
"dataDiskImages": [
{
"diskEncryptionSetId": "string",
"lun": "int"
}
],
"osDiskImage": {
"diskEncryptionSetId": "string",
"securityProfile": {
"confidentialVMEncryptionType": "string",
"secureVMDiskEncryptionSetId": "string"
}
}
},
"extendedLocation": {
"name": "string",
"type": "string"
},
"extendedLocationReplicaCount": "int",
"name": "string",
"storageAccountType": "string"
}
],
"targetRegions": [
{
"additionalReplicaSets": [
{
"regionalReplicaCount": "int",
"storageAccountType": "string"
}
],
"encryption": {
"dataDiskImages": [
{
"diskEncryptionSetId": "string",
"lun": "int"
}
],
"osDiskImage": {
"diskEncryptionSetId": "string",
"securityProfile": {
"confidentialVMEncryptionType": "string",
"secureVMDiskEncryptionSetId": "string"
}
}
},
"excludeFromLatest": "bool",
"name": "string",
"regionalReplicaCount": "int",
"storageAccountType": "string"
}
]
},
"safetyProfile": {
"allowDeletionOfReplicatedLocations": "bool"
}
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.Compute/galleries/applications/versions
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2024-03-03' |
| ___location | The geo-___location where the resource lives | string (required) |
| name | The resource name | string (required) |
| properties | Describes the properties of a gallery image version. | GalleryApplicationVersionProperties |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
| type | The resource type | 'Microsoft.Compute/galleries/applications/versions' |
AdditionalReplicaSet
| Name | Description | Value |
|---|---|---|
| regionalReplicaCount | The number of direct drive replicas of the Image Version to be created.This Property is updatable | int |
| storageAccountType | Specifies the storage account type to be used to create the direct drive replicas | 'PremiumV2_LRS' 'Premium_LRS' 'Standard_LRS' 'Standard_ZRS' |
DataDiskImageEncryption
| Name | Description | Value |
|---|---|---|
| diskEncryptionSetId | A relative URI containing the resource ID of the disk encryption set. | string |
| lun | This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine. | int (required) |
EncryptionImages
| Name | Description | Value |
|---|---|---|
| dataDiskImages | A list of encryption specifications for data disk images. | DataDiskImageEncryption[] |
| osDiskImage | Contains encryption settings for an OS disk image. | OSDiskImageEncryption |
GalleryApplicationCustomAction
| Name | Description | Value |
|---|---|---|
| description | Description to help the users understand what this custom action does. | string |
| name | The name of the custom action. Must be unique within the Gallery Application Version. | string (required) |
| parameters | The parameters that this custom action uses | GalleryApplicationCustomActionParameter[] |
| script | The script to run when executing this custom action. | string (required) |
GalleryApplicationCustomActionParameter
| Name | Description | Value |
|---|---|---|
| defaultValue | The default value of the parameter. Only applies to string types | string |
| description | A description to help users understand what this parameter means | string |
| name | The name of the custom action. Must be unique within the Gallery Application Version. | string (required) |
| required | Indicates whether this parameter must be passed when running the custom action. | bool |
| type | Specifies the type of the custom action parameter. Possible values are: String, ConfigurationDataBlob or LogOutputBlob | 'ConfigurationDataBlob' 'LogOutputBlob' 'String' |
GalleryApplicationVersionProperties
| Name | Description | Value |
|---|---|---|
| publishingProfile | The publishing profile of a gallery image version. | GalleryApplicationVersionPublishingProfile (required) |
| safetyProfile | The safety profile of the Gallery Application Version. | GalleryApplicationVersionSafetyProfile |
GalleryApplicationVersionPublishingProfile
| Name | Description | Value |
|---|---|---|
| advancedSettings | Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. | GalleryApplicationVersionPublishingProfileAdvancedSettings |
| customActions | A list of custom actions that can be performed with this Gallery Application Version. | GalleryApplicationCustomAction[] |
| enableHealthCheck | Optional. Whether or not this application reports health. | bool |
| endOfLifeDate | The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property is updatable. | string |
| excludeFromLatest | If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. | bool |
| manageActions | UserArtifactManage | |
| replicaCount | The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable. | int |
| replicationMode | Optional parameter which specifies the mode to be used for replication. This property is not updatable. | 'Full' 'Shallow' |
| settings | Additional settings for the VM app that contains the target package and config file name when it is deployed to target VM or VM scale set. | UserArtifactSettings |
| source | The source image from which the Image Version is going to be created. | UserArtifactSource (required) |
| storageAccountType | Specifies the storage account type to be used to store the image. This property is not updatable. | 'PremiumV2_LRS' 'Premium_LRS' 'Standard_LRS' 'Standard_ZRS' |
| targetExtendedLocations | The target extended locations where the Image Version is going to be replicated to. This property is updatable. | GalleryTargetExtendedLocation[] |
| targetRegions | The target regions where the Image Version is going to be replicated to. This property is updatable. | TargetRegion[] |
GalleryApplicationVersionPublishingProfileAdvancedSettings
| Name | Description | Value |
|---|
GalleryApplicationVersionSafetyProfile
| Name | Description | Value |
|---|---|---|
| allowDeletionOfReplicatedLocations | Indicates whether or not removing this Gallery Image Version from replicated regions is allowed. | bool |
GalleryExtendedLocation
| Name | Description | Value |
|---|---|---|
| name | string | |
| type | It is type of the extended ___location. | 'EdgeZone' 'Unknown' |
GalleryTargetExtendedLocation
| Name | Description | Value |
|---|---|---|
| encryption | Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. | EncryptionImages |
| extendedLocation | The name of the extended ___location. | GalleryExtendedLocation |
| extendedLocationReplicaCount | The number of replicas of the Image Version to be created per extended ___location. This property is updatable. | int |
| name | The name of the region. | string |
| storageAccountType | Specifies the storage account type to be used to store the image. This property is not updatable. | 'Premium_LRS' 'StandardSSD_LRS' 'Standard_LRS' 'Standard_ZRS' |
OSDiskImageEncryption
| Name | Description | Value |
|---|---|---|
| diskEncryptionSetId | A relative URI containing the resource ID of the disk encryption set. | string |
| securityProfile | This property specifies the security profile of an OS disk image. | OSDiskImageSecurityProfile |
OSDiskImageSecurityProfile
| Name | Description | Value |
|---|---|---|
| confidentialVMEncryptionType | confidential VM encryption types | 'EncryptedVMGuestStateOnlyWithPmk' 'EncryptedWithCmk' 'EncryptedWithPmk' 'NonPersistedTPM' |
| secureVMDiskEncryptionSetId | secure VM disk encryption set id | string |
TargetRegion
| Name | Description | Value |
|---|---|---|
| additionalReplicaSets | List of storage sku with replica count to create direct drive replicas. | AdditionalReplicaSet[] |
| encryption | Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. | EncryptionImages |
| excludeFromLatest | Contains the flag setting to hide an image when users specify version='latest' | bool |
| name | The name of the region. | string (required) |
| regionalReplicaCount | The number of replicas of the Image Version to be created per region. This property is updatable. | int |
| storageAccountType | Specifies the storage account type to be used to store the image. This property is not updatable. | 'PremiumV2_LRS' 'Premium_LRS' 'Standard_LRS' 'Standard_ZRS' |
TrackedResourceTags
| Name | Description | Value |
|---|
UserArtifactManage
| Name | Description | Value |
|---|---|---|
| install | Required. The path and arguments to install the gallery application. This is limited to 4096 characters. | string (required) |
| remove | Required. The path and arguments to remove the gallery application. This is limited to 4096 characters. | string (required) |
| update | Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke remove command on the previous version and install command on the current version of the gallery application. This is limited to 4096 characters. | string |
UserArtifactSettings
| Name | Description | Value |
|---|---|---|
| configFileName | Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, the config file will be named the Gallery Application name appended with "_config". | string |
| packageFileName | Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, the package file will be named the same as the Gallery Application name. | string |
| scriptBehaviorAfterReboot | Optional. The action to be taken with regards to install/update/remove of the gallery application in the event of a reboot. | 'None' 'Rerun' |
UserArtifactSource
| Name | Description | Value |
|---|---|---|
| defaultConfigurationLink | Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob. | string |
| mediaLink | Required. The mediaLink of the artifact, must be a readable storage page blob. | string (required) |
Usage Examples
Terraform (AzAPI provider) resource definition
The galleries/applications/versions resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Compute/galleries/applications/versions resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Compute/galleries/applications/versions@2024-03-03"
name = "string"
parent_id = "string"
___location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
publishingProfile = {
advancedSettings = {
{customized property} = "string"
}
customActions = [
{
description = "string"
name = "string"
parameters = [
{
defaultValue = "string"
description = "string"
name = "string"
required = bool
type = "string"
}
]
script = "string"
}
]
enableHealthCheck = bool
endOfLifeDate = "string"
excludeFromLatest = bool
manageActions = {
install = "string"
remove = "string"
update = "string"
}
replicaCount = int
replicationMode = "string"
settings = {
configFileName = "string"
packageFileName = "string"
scriptBehaviorAfterReboot = "string"
}
source = {
defaultConfigurationLink = "string"
mediaLink = "string"
}
storageAccountType = "string"
targetExtendedLocations = [
{
encryption = {
dataDiskImages = [
{
diskEncryptionSetId = "string"
lun = int
}
]
osDiskImage = {
diskEncryptionSetId = "string"
securityProfile = {
confidentialVMEncryptionType = "string"
secureVMDiskEncryptionSetId = "string"
}
}
}
extendedLocation = {
name = "string"
type = "string"
}
extendedLocationReplicaCount = int
name = "string"
storageAccountType = "string"
}
]
targetRegions = [
{
additionalReplicaSets = [
{
regionalReplicaCount = int
storageAccountType = "string"
}
]
encryption = {
dataDiskImages = [
{
diskEncryptionSetId = "string"
lun = int
}
]
osDiskImage = {
diskEncryptionSetId = "string"
securityProfile = {
confidentialVMEncryptionType = "string"
secureVMDiskEncryptionSetId = "string"
}
}
}
excludeFromLatest = bool
name = "string"
regionalReplicaCount = int
storageAccountType = "string"
}
]
}
safetyProfile = {
allowDeletionOfReplicatedLocations = bool
}
}
}
}
Property Values
Microsoft.Compute/galleries/applications/versions
| Name | Description | Value |
|---|---|---|
| ___location | The geo-___location where the resource lives | string (required) |
| name | The resource name | string (required) |
| parent_id | The ID of the resource that is the parent for this resource. | ID for resource of type: galleries/applications |
| properties | Describes the properties of a gallery image version. | GalleryApplicationVersionProperties |
| tags | Resource tags | Dictionary of tag names and values. |
| type | The resource type | "Microsoft.Compute/galleries/applications/versions@2024-03-03" |
AdditionalReplicaSet
| Name | Description | Value |
|---|---|---|
| regionalReplicaCount | The number of direct drive replicas of the Image Version to be created.This Property is updatable | int |
| storageAccountType | Specifies the storage account type to be used to create the direct drive replicas | 'PremiumV2_LRS' 'Premium_LRS' 'Standard_LRS' 'Standard_ZRS' |
DataDiskImageEncryption
| Name | Description | Value |
|---|---|---|
| diskEncryptionSetId | A relative URI containing the resource ID of the disk encryption set. | string |
| lun | This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine. | int (required) |
EncryptionImages
| Name | Description | Value |
|---|---|---|
| dataDiskImages | A list of encryption specifications for data disk images. | DataDiskImageEncryption[] |
| osDiskImage | Contains encryption settings for an OS disk image. | OSDiskImageEncryption |
GalleryApplicationCustomAction
| Name | Description | Value |
|---|---|---|
| description | Description to help the users understand what this custom action does. | string |
| name | The name of the custom action. Must be unique within the Gallery Application Version. | string (required) |
| parameters | The parameters that this custom action uses | GalleryApplicationCustomActionParameter[] |
| script | The script to run when executing this custom action. | string (required) |
GalleryApplicationCustomActionParameter
| Name | Description | Value |
|---|---|---|
| defaultValue | The default value of the parameter. Only applies to string types | string |
| description | A description to help users understand what this parameter means | string |
| name | The name of the custom action. Must be unique within the Gallery Application Version. | string (required) |
| required | Indicates whether this parameter must be passed when running the custom action. | bool |
| type | Specifies the type of the custom action parameter. Possible values are: String, ConfigurationDataBlob or LogOutputBlob | 'ConfigurationDataBlob' 'LogOutputBlob' 'String' |
GalleryApplicationVersionProperties
| Name | Description | Value |
|---|---|---|
| publishingProfile | The publishing profile of a gallery image version. | GalleryApplicationVersionPublishingProfile (required) |
| safetyProfile | The safety profile of the Gallery Application Version. | GalleryApplicationVersionSafetyProfile |
GalleryApplicationVersionPublishingProfile
| Name | Description | Value |
|---|---|---|
| advancedSettings | Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. | GalleryApplicationVersionPublishingProfileAdvancedSettings |
| customActions | A list of custom actions that can be performed with this Gallery Application Version. | GalleryApplicationCustomAction[] |
| enableHealthCheck | Optional. Whether or not this application reports health. | bool |
| endOfLifeDate | The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property is updatable. | string |
| excludeFromLatest | If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. | bool |
| manageActions | UserArtifactManage | |
| replicaCount | The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable. | int |
| replicationMode | Optional parameter which specifies the mode to be used for replication. This property is not updatable. | 'Full' 'Shallow' |
| settings | Additional settings for the VM app that contains the target package and config file name when it is deployed to target VM or VM scale set. | UserArtifactSettings |
| source | The source image from which the Image Version is going to be created. | UserArtifactSource (required) |
| storageAccountType | Specifies the storage account type to be used to store the image. This property is not updatable. | 'PremiumV2_LRS' 'Premium_LRS' 'Standard_LRS' 'Standard_ZRS' |
| targetExtendedLocations | The target extended locations where the Image Version is going to be replicated to. This property is updatable. | GalleryTargetExtendedLocation[] |
| targetRegions | The target regions where the Image Version is going to be replicated to. This property is updatable. | TargetRegion[] |
GalleryApplicationVersionPublishingProfileAdvancedSettings
| Name | Description | Value |
|---|
GalleryApplicationVersionSafetyProfile
| Name | Description | Value |
|---|---|---|
| allowDeletionOfReplicatedLocations | Indicates whether or not removing this Gallery Image Version from replicated regions is allowed. | bool |
GalleryExtendedLocation
| Name | Description | Value |
|---|---|---|
| name | string | |
| type | It is type of the extended ___location. | 'EdgeZone' 'Unknown' |
GalleryTargetExtendedLocation
| Name | Description | Value |
|---|---|---|
| encryption | Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. | EncryptionImages |
| extendedLocation | The name of the extended ___location. | GalleryExtendedLocation |
| extendedLocationReplicaCount | The number of replicas of the Image Version to be created per extended ___location. This property is updatable. | int |
| name | The name of the region. | string |
| storageAccountType | Specifies the storage account type to be used to store the image. This property is not updatable. | 'Premium_LRS' 'StandardSSD_LRS' 'Standard_LRS' 'Standard_ZRS' |
OSDiskImageEncryption
| Name | Description | Value |
|---|---|---|
| diskEncryptionSetId | A relative URI containing the resource ID of the disk encryption set. | string |
| securityProfile | This property specifies the security profile of an OS disk image. | OSDiskImageSecurityProfile |
OSDiskImageSecurityProfile
| Name | Description | Value |
|---|---|---|
| confidentialVMEncryptionType | confidential VM encryption types | 'EncryptedVMGuestStateOnlyWithPmk' 'EncryptedWithCmk' 'EncryptedWithPmk' 'NonPersistedTPM' |
| secureVMDiskEncryptionSetId | secure VM disk encryption set id | string |
TargetRegion
| Name | Description | Value |
|---|---|---|
| additionalReplicaSets | List of storage sku with replica count to create direct drive replicas. | AdditionalReplicaSet[] |
| encryption | Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. | EncryptionImages |
| excludeFromLatest | Contains the flag setting to hide an image when users specify version='latest' | bool |
| name | The name of the region. | string (required) |
| regionalReplicaCount | The number of replicas of the Image Version to be created per region. This property is updatable. | int |
| storageAccountType | Specifies the storage account type to be used to store the image. This property is not updatable. | 'PremiumV2_LRS' 'Premium_LRS' 'Standard_LRS' 'Standard_ZRS' |
TrackedResourceTags
| Name | Description | Value |
|---|
UserArtifactManage
| Name | Description | Value |
|---|---|---|
| install | Required. The path and arguments to install the gallery application. This is limited to 4096 characters. | string (required) |
| remove | Required. The path and arguments to remove the gallery application. This is limited to 4096 characters. | string (required) |
| update | Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke remove command on the previous version and install command on the current version of the gallery application. This is limited to 4096 characters. | string |
UserArtifactSettings
| Name | Description | Value |
|---|---|---|
| configFileName | Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, the config file will be named the Gallery Application name appended with "_config". | string |
| packageFileName | Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, the package file will be named the same as the Gallery Application name. | string |
| scriptBehaviorAfterReboot | Optional. The action to be taken with regards to install/update/remove of the gallery application in the event of a reboot. | 'None' 'Rerun' |
UserArtifactSource
| Name | Description | Value |
|---|---|---|
| defaultConfigurationLink | Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob. | string |
| mediaLink | Required. The mediaLink of the artifact, must be a readable storage page blob. | string (required) |
Usage Examples
Terraform Samples
A basic example of deploying Gallery Application Version.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "___location" {
type = string
default = "westus"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
___location = var.___location
}
resource "azapi_resource" "gallery" {
type = "Microsoft.Compute/galleries@2022-03-03"
parent_id = azapi_resource.resourceGroup.id
name = "${var.resource_name}sig"
___location = var.___location
body = {
properties = {
description = ""
}
}
}
resource "azapi_resource" "storageAccount" {
type = "Microsoft.Storage/storageAccounts@2023-05-01"
parent_id = azapi_resource.resourceGroup.id
name = "${var.resource_name}acc"
___location = var.___location
body = {
kind = "StorageV2"
properties = {
accessTier = "Hot"
allowBlobPublicAccess = true
allowCrossTenantReplication = false
allowSharedKeyAccess = true
defaultToOAuthAuthentication = false
dnsEndpointType = "Standard"
encryption = {
keySource = "Microsoft.Storage"
services = {
queue = {
keyType = "Service"
}
table = {
keyType = "Service"
}
}
}
isHnsEnabled = false
isLocalUserEnabled = true
isNfsV3Enabled = false
isSftpEnabled = false
minimumTlsVersion = "TLS1_2"
networkAcls = {
bypass = "AzureServices"
defaultAction = "Allow"
ipRules = []
resourceAccessRules = []
virtualNetworkRules = []
}
publicNetworkAccess = "Enabled"
supportsHttpsTrafficOnly = true
}
sku = {
name = "Standard_LRS"
}
}
}
resource "azapi_resource" "application" {
type = "Microsoft.Compute/galleries/applications@2022-03-03"
parent_id = azapi_resource.gallery.id
name = "${var.resource_name}-app"
___location = var.___location
body = {
properties = {
supportedOSType = "Linux"
}
}
}
resource "azapi_resource" "container" {
type = "Microsoft.Storage/storageAccounts/blobServices/containers@2023-05-01"
parent_id = "${azapi_resource.storageAccount.id}/blobServices/default"
name = "mycontainer"
body = {
properties = {
publicAccess = "Blob"
}
}
}
resource "azapi_resource" "version" {
type = "Microsoft.Compute/galleries/applications/versions@2022-03-03"
parent_id = azapi_resource.application.id
name = "0.0.1"
___location = var.___location
body = {
properties = {
publishingProfile = {
enableHealthCheck = false
excludeFromLatest = false
manageActions = {
install = "[install command]"
remove = "[remove command]"
update = ""
}
source = {
defaultConfigurationLink = ""
mediaLink = "https://${azapi_resource.storageAccount.name}.blob.core.windows.net/mycontainer/myblob"
}
targetRegions = [{
name = var.___location
regionalReplicaCount = 1
storageAccountType = "Standard_LRS"
}]
}
safetyProfile = {
allowDeletionOfReplicatedLocations = true
}
}
}
depends_on = [azapi_resource.container]
}