Bicep resource definition
The galleries/images resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.Compute/galleries/images resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Compute/galleries/images@2024-03-03' = {
parent: resourceSymbolicName
location: 'string'
name: 'string'
properties: {
allowUpdateImage: bool
architecture: 'string'
description: 'string'
disallowed: {
diskTypes: [
'string'
]
}
endOfLifeDate: 'string'
eula: 'string'
features: [
{
name: 'string'
startsAtVersion: 'string'
value: 'string'
}
]
hyperVGeneration: 'string'
identifier: {
offer: 'string'
publisher: 'string'
sku: 'string'
}
osState: 'string'
osType: 'string'
privacyStatementUri: 'string'
purchasePlan: {
name: 'string'
product: 'string'
publisher: 'string'
}
recommended: {
memory: {
max: int
min: int
}
vCPUs: {
max: int
min: int
}
}
releaseNoteUri: 'string'
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.Compute/galleries/images
Name |
Description |
Value |
location |
Resource location |
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 |
properties |
Describes the properties of a gallery image definition. |
GalleryImageProperties |
tags |
Resource tags |
Dictionary of tag names and values. See Tags in templates |
Disallowed
Name |
Description |
Value |
diskTypes |
A list of disk types. |
string[] |
GalleryImageFeature
Name |
Description |
Value |
name |
The name of the gallery image feature. |
string |
startsAtVersion |
The minimum gallery image version which supports this feature. |
string |
value |
The value of the gallery image feature. |
string |
GalleryImageIdentifier
Name |
Description |
Value |
offer |
The name of the gallery image definition offer. |
string (required) |
publisher |
The name of the gallery image definition publisher. |
string (required) |
sku |
The name of the gallery image definition SKU. |
string (required) |
GalleryImageProperties
Name |
Description |
Value |
allowUpdateImage |
Optional. Must be set to true if the gallery image features are being updated. |
bool |
architecture |
The architecture of the image. Applicable to OS disks only. |
'Arm64' 'x64' |
description |
The description of this gallery image definition resource. This property is updatable. |
string |
disallowed |
Describes the disallowed disk types. |
Disallowed |
endOfLifeDate |
The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable. |
string |
eula |
The Eula agreement for the gallery image definition. |
string |
features |
A list of gallery image features. |
GalleryImageFeature[] |
hyperVGeneration |
The hypervisor generation of the Virtual Machine. Applicable to OS disks only. |
'V1' 'V2' |
identifier |
This is the gallery image definition identifier. |
GalleryImageIdentifier (required) |
osState |
This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. |
'Generalized' 'Specialized' (required) |
osType |
This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image. Possible values are: Windows, Linux. |
'Linux' 'Windows' (required) |
privacyStatementUri |
The privacy statement uri. |
string |
purchasePlan |
Describes the gallery image definition purchase plan. This is used by marketplace images. |
ImagePurchasePlan |
recommended |
The properties describe the recommended machine configuration for this Image Definition. These properties are updatable. |
RecommendedMachineConfiguration |
releaseNoteUri |
The release note uri. |
string |
ImagePurchasePlan
Name |
Description |
Value |
name |
The plan ID. |
string |
product |
The product ID. |
string |
publisher |
The publisher ID. |
string |
RecommendedMachineConfiguration
ResourceRange
Name |
Description |
Value |
max |
The maximum number of the resource. |
int |
min |
The minimum number of the resource. |
int |
Usage Examples
Azure Quickstart Samples
The following Azure Quickstart templates contain Bicep samples for deploying this resource type.
Bicep File |
Description |
Azure Image Builder with Azure Windows Baseline |
Creates an Azure Image Builder environment and builds a Windows Server image with the latest Windows Updates and Azure Windows Baseline applied. |
Configure Dev Box service |
This template would create all Dev Box admin resources as per Dev Box quick start guide (/azure/dev-box/quickstart-create-dev-box). You can view all resources created, or directly go to DevPortal.microsoft.com to create your first Dev Box. |
ARM template resource definition
The galleries/images resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.Compute/galleries/images resource, add the following JSON to your template.
{
"type": "Microsoft.Compute/galleries/images",
"apiVersion": "2024-03-03",
"name": "string",
"location": "string",
"properties": {
"allowUpdateImage": "bool",
"architecture": "string",
"description": "string",
"disallowed": {
"diskTypes": [ "string" ]
},
"endOfLifeDate": "string",
"eula": "string",
"features": [
{
"name": "string",
"startsAtVersion": "string",
"value": "string"
}
],
"hyperVGeneration": "string",
"identifier": {
"offer": "string",
"publisher": "string",
"sku": "string"
},
"osState": "string",
"osType": "string",
"privacyStatementUri": "string",
"purchasePlan": {
"name": "string",
"product": "string",
"publisher": "string"
},
"recommended": {
"memory": {
"max": "int",
"min": "int"
},
"vCPUs": {
"max": "int",
"min": "int"
}
},
"releaseNoteUri": "string"
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.Compute/galleries/images
Name |
Description |
Value |
apiVersion |
The api version |
'2024-03-03' |
location |
Resource location |
string (required) |
name |
The resource name |
string (required) |
properties |
Describes the properties of a gallery image definition. |
GalleryImageProperties |
tags |
Resource tags |
Dictionary of tag names and values. See Tags in templates |
type |
The resource type |
'Microsoft.Compute/galleries/images' |
Disallowed
Name |
Description |
Value |
diskTypes |
A list of disk types. |
string[] |
GalleryImageFeature
Name |
Description |
Value |
name |
The name of the gallery image feature. |
string |
startsAtVersion |
The minimum gallery image version which supports this feature. |
string |
value |
The value of the gallery image feature. |
string |
GalleryImageIdentifier
Name |
Description |
Value |
offer |
The name of the gallery image definition offer. |
string (required) |
publisher |
The name of the gallery image definition publisher. |
string (required) |
sku |
The name of the gallery image definition SKU. |
string (required) |
GalleryImageProperties
Name |
Description |
Value |
allowUpdateImage |
Optional. Must be set to true if the gallery image features are being updated. |
bool |
architecture |
The architecture of the image. Applicable to OS disks only. |
'Arm64' 'x64' |
description |
The description of this gallery image definition resource. This property is updatable. |
string |
disallowed |
Describes the disallowed disk types. |
Disallowed |
endOfLifeDate |
The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable. |
string |
eula |
The Eula agreement for the gallery image definition. |
string |
features |
A list of gallery image features. |
GalleryImageFeature[] |
hyperVGeneration |
The hypervisor generation of the Virtual Machine. Applicable to OS disks only. |
'V1' 'V2' |
identifier |
This is the gallery image definition identifier. |
GalleryImageIdentifier (required) |
osState |
This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. |
'Generalized' 'Specialized' (required) |
osType |
This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image. Possible values are: Windows, Linux. |
'Linux' 'Windows' (required) |
privacyStatementUri |
The privacy statement uri. |
string |
purchasePlan |
Describes the gallery image definition purchase plan. This is used by marketplace images. |
ImagePurchasePlan |
recommended |
The properties describe the recommended machine configuration for this Image Definition. These properties are updatable. |
RecommendedMachineConfiguration |
releaseNoteUri |
The release note uri. |
string |
ImagePurchasePlan
Name |
Description |
Value |
name |
The plan ID. |
string |
product |
The product ID. |
string |
publisher |
The publisher ID. |
string |
RecommendedMachineConfiguration
ResourceRange
Name |
Description |
Value |
max |
The maximum number of the resource. |
int |
min |
The minimum number of the resource. |
int |
Usage Examples
Azure Quickstart Templates
The following Azure Quickstart templates deploy this resource type.
Template |
Description |
Azure Image Builder with Azure Windows Baseline
 |
Creates an Azure Image Builder environment and builds a Windows Server image with the latest Windows Updates and Azure Windows Baseline applied. |
Configure Dev Box service
 |
This template would create all Dev Box admin resources as per Dev Box quick start guide (/azure/dev-box/quickstart-create-dev-box). You can view all resources created, or directly go to DevPortal.microsoft.com to create your first Dev Box. |
Create an Image Definition in a Azure Compute Gallery
 |
This template allows you to create a simple Image Definition in a Azure Compute Gallery. Please ensure that you have run the Shared Image Gallery 101 Template before you deploy this. |
The galleries/images resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.Compute/galleries/images resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Compute/galleries/images@2024-03-03"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
allowUpdateImage = bool
architecture = "string"
description = "string"
disallowed = {
diskTypes = [
"string"
]
}
endOfLifeDate = "string"
eula = "string"
features = [
{
name = "string"
startsAtVersion = "string"
value = "string"
}
]
hyperVGeneration = "string"
identifier = {
offer = "string"
publisher = "string"
sku = "string"
}
osState = "string"
osType = "string"
privacyStatementUri = "string"
purchasePlan = {
name = "string"
product = "string"
publisher = "string"
}
recommended = {
memory = {
max = int
min = int
}
vCPUs = {
max = int
min = int
}
}
releaseNoteUri = "string"
}
}
}
Property Values
Microsoft.Compute/galleries/images
Name |
Description |
Value |
location |
Resource location |
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 |
properties |
Describes the properties of a gallery image definition. |
GalleryImageProperties |
tags |
Resource tags |
Dictionary of tag names and values. |
type |
The resource type |
"Microsoft.Compute/galleries/images@2024-03-03" |
Disallowed
Name |
Description |
Value |
diskTypes |
A list of disk types. |
string[] |
GalleryImageFeature
Name |
Description |
Value |
name |
The name of the gallery image feature. |
string |
startsAtVersion |
The minimum gallery image version which supports this feature. |
string |
value |
The value of the gallery image feature. |
string |
GalleryImageIdentifier
Name |
Description |
Value |
offer |
The name of the gallery image definition offer. |
string (required) |
publisher |
The name of the gallery image definition publisher. |
string (required) |
sku |
The name of the gallery image definition SKU. |
string (required) |
GalleryImageProperties
Name |
Description |
Value |
allowUpdateImage |
Optional. Must be set to true if the gallery image features are being updated. |
bool |
architecture |
The architecture of the image. Applicable to OS disks only. |
'Arm64' 'x64' |
description |
The description of this gallery image definition resource. This property is updatable. |
string |
disallowed |
Describes the disallowed disk types. |
Disallowed |
endOfLifeDate |
The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable. |
string |
eula |
The Eula agreement for the gallery image definition. |
string |
features |
A list of gallery image features. |
GalleryImageFeature[] |
hyperVGeneration |
The hypervisor generation of the Virtual Machine. Applicable to OS disks only. |
'V1' 'V2' |
identifier |
This is the gallery image definition identifier. |
GalleryImageIdentifier (required) |
osState |
This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. |
'Generalized' 'Specialized' (required) |
osType |
This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image. Possible values are: Windows, Linux. |
'Linux' 'Windows' (required) |
privacyStatementUri |
The privacy statement uri. |
string |
purchasePlan |
Describes the gallery image definition purchase plan. This is used by marketplace images. |
ImagePurchasePlan |
recommended |
The properties describe the recommended machine configuration for this Image Definition. These properties are updatable. |
RecommendedMachineConfiguration |
releaseNoteUri |
The release note uri. |
string |
ImagePurchasePlan
Name |
Description |
Value |
name |
The plan ID. |
string |
product |
The product ID. |
string |
publisher |
The publisher ID. |
string |
RecommendedMachineConfiguration
ResourceRange
Name |
Description |
Value |
max |
The maximum number of the resource. |
int |
min |
The minimum number of the resource. |
int |