Bicep resource definition
The galleries 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 resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Compute/galleries@2024-03-03' = {
scope: resourceSymbolicName or scope
identity: {
type: 'string'
userAssignedIdentities: {
{customized property}: {}
}
}
___location: 'string'
name: 'string'
properties: {
description: 'string'
identifier: {}
sharingProfile: {
communityGalleryInfo: {
eula: 'string'
publicNamePrefix: 'string'
publisherContact: 'string'
publisherUri: 'string'
}
permissions: 'string'
}
softDeletePolicy: {
isSoftDeleteEnabled: bool
}
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.Compute/galleries
| Name |
Description |
Value |
| identity |
The identity of the gallery, if configured. |
GalleryIdentity |
| ___location |
The geo-___location where the resource lives |
string (required) |
| name |
The resource name |
string (required) |
| properties |
Describes the properties of a Shared Image Gallery. |
GalleryProperties |
| scope |
Use when creating a resource at a scope that is different than the deployment scope. |
Set this property to the symbolic name of a resource to apply the extension resource. |
| tags |
Resource tags |
Dictionary of tag names and values. See Tags in templates |
| Name |
Description |
Value |
| eula |
End-user license agreement for community gallery image. |
string |
| publicNamePrefix |
The prefix of the gallery name that will be displayed publicly. Visible to all users. |
string |
| publisherContact |
Community gallery publisher support email. The email address of the publisher. Visible to all users. |
string |
| publisherUri |
The link to the publisher website. Visible to all users. |
string |
GalleryIdentifier
GalleryIdentity
| Name |
Description |
Value |
| type |
The type of identity used for the gallery. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove all identities from the gallery. |
'None' 'SystemAssigned' 'SystemAssigned, UserAssigned' 'UserAssigned' |
| userAssignedIdentities |
The list of user identities associated with the gallery. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. |
GalleryIdentityUserAssignedIdentities |
GalleryIdentityUserAssignedIdentities
GalleryProperties
| Name |
Description |
Value |
| description |
The description of this Shared Image Gallery resource. This property is updatable. |
string |
| identifier |
Describes the gallery unique name. |
GalleryIdentifier |
| sharingProfile |
Profile for gallery sharing to subscription or tenant |
SharingProfile |
| softDeletePolicy |
Contains information about the soft deletion policy of the gallery. |
SoftDeletePolicy |
SharingProfile
| Name |
Description |
Value |
| communityGalleryInfo |
Information of community gallery if current gallery is shared to community. |
CommunityGalleryInfo |
| permissions |
This property allows you to specify the permission of sharing gallery. Possible values are: Private, Groups, Community. |
'Community' 'Groups' 'Private' |
SoftDeletePolicy
| Name |
Description |
Value |
| isSoftDeleteEnabled |
Enables soft-deletion for resources in this gallery, allowing them to be recovered within retention time. |
bool |
UserAssignedIdentitiesValue
Usage Examples
Azure Verified Modules
The following Azure Verified Modules can be used to deploy this resource type.
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 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 resource, add the following JSON to your template.
{
"type": "Microsoft.Compute/galleries",
"apiVersion": "2024-03-03",
"name": "string",
"identity": {
"type": "string",
"userAssignedIdentities": {
"{customized property}": {
}
}
},
"___location": "string",
"properties": {
"description": "string",
"identifier": {
},
"sharingProfile": {
"communityGalleryInfo": {
"eula": "string",
"publicNamePrefix": "string",
"publisherContact": "string",
"publisherUri": "string"
},
"permissions": "string"
},
"softDeletePolicy": {
"isSoftDeleteEnabled": "bool"
}
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.Compute/galleries
| Name |
Description |
Value |
| apiVersion |
The api version |
'2024-03-03' |
| identity |
The identity of the gallery, if configured. |
GalleryIdentity |
| ___location |
The geo-___location where the resource lives |
string (required) |
| name |
The resource name |
string (required) |
| properties |
Describes the properties of a Shared Image Gallery. |
GalleryProperties |
| tags |
Resource tags |
Dictionary of tag names and values. See Tags in templates |
| type |
The resource type |
'Microsoft.Compute/galleries' |
| Name |
Description |
Value |
| eula |
End-user license agreement for community gallery image. |
string |
| publicNamePrefix |
The prefix of the gallery name that will be displayed publicly. Visible to all users. |
string |
| publisherContact |
Community gallery publisher support email. The email address of the publisher. Visible to all users. |
string |
| publisherUri |
The link to the publisher website. Visible to all users. |
string |
GalleryIdentifier
GalleryIdentity
| Name |
Description |
Value |
| type |
The type of identity used for the gallery. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove all identities from the gallery. |
'None' 'SystemAssigned' 'SystemAssigned, UserAssigned' 'UserAssigned' |
| userAssignedIdentities |
The list of user identities associated with the gallery. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. |
GalleryIdentityUserAssignedIdentities |
GalleryIdentityUserAssignedIdentities
GalleryProperties
| Name |
Description |
Value |
| description |
The description of this Shared Image Gallery resource. This property is updatable. |
string |
| identifier |
Describes the gallery unique name. |
GalleryIdentifier |
| sharingProfile |
Profile for gallery sharing to subscription or tenant |
SharingProfile |
| softDeletePolicy |
Contains information about the soft deletion policy of the gallery. |
SoftDeletePolicy |
SharingProfile
| Name |
Description |
Value |
| communityGalleryInfo |
Information of community gallery if current gallery is shared to community. |
CommunityGalleryInfo |
| permissions |
This property allows you to specify the permission of sharing gallery. Possible values are: Private, Groups, Community. |
'Community' 'Groups' 'Private' |
SoftDeletePolicy
| Name |
Description |
Value |
| isSoftDeleteEnabled |
Enables soft-deletion for resources in this gallery, allowing them to be recovered within retention time. |
bool |
UserAssignedIdentitiesValue
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 a Azure Compute Gallery
 |
This template allows you to create a Azure Compute Gallery. |
Create an Azure Compute Gallery
 |
This module creates an Azure Compute Gallery resource with apiVersion 2019-12-01. |
The galleries 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 resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Compute/galleries@2024-03-03"
name = "string"
parent_id = "string"
identity {
type = "string"
identity_ids = [
"string"
]
}
___location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
description = "string"
identifier = {
}
sharingProfile = {
communityGalleryInfo = {
eula = "string"
publicNamePrefix = "string"
publisherContact = "string"
publisherUri = "string"
}
permissions = "string"
}
softDeletePolicy = {
isSoftDeleteEnabled = bool
}
}
}
}
Property Values
Microsoft.Compute/galleries
| Name |
Description |
Value |
| identity |
The identity of the gallery, if configured. |
GalleryIdentity |
| ___location |
The geo-___location where the resource lives |
string (required) |
| name |
The resource name |
string (required) |
| parent_id |
The ID of the resource to apply this extension resource to. |
string (required) |
| properties |
Describes the properties of a Shared Image Gallery. |
GalleryProperties |
| tags |
Resource tags |
Dictionary of tag names and values. |
| type |
The resource type |
"Microsoft.Compute/galleries@2024-03-03" |
| Name |
Description |
Value |
| eula |
End-user license agreement for community gallery image. |
string |
| publicNamePrefix |
The prefix of the gallery name that will be displayed publicly. Visible to all users. |
string |
| publisherContact |
Community gallery publisher support email. The email address of the publisher. Visible to all users. |
string |
| publisherUri |
The link to the publisher website. Visible to all users. |
string |
GalleryIdentifier
GalleryIdentity
| Name |
Description |
Value |
| type |
The type of identity used for the gallery. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove all identities from the gallery. |
'None' 'SystemAssigned' 'SystemAssigned, UserAssigned' 'UserAssigned' |
| userAssignedIdentities |
The list of user identities associated with the gallery. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. |
GalleryIdentityUserAssignedIdentities |
GalleryIdentityUserAssignedIdentities
GalleryProperties
| Name |
Description |
Value |
| description |
The description of this Shared Image Gallery resource. This property is updatable. |
string |
| identifier |
Describes the gallery unique name. |
GalleryIdentifier |
| sharingProfile |
Profile for gallery sharing to subscription or tenant |
SharingProfile |
| softDeletePolicy |
Contains information about the soft deletion policy of the gallery. |
SoftDeletePolicy |
SharingProfile
| Name |
Description |
Value |
| communityGalleryInfo |
Information of community gallery if current gallery is shared to community. |
CommunityGalleryInfo |
| permissions |
This property allows you to specify the permission of sharing gallery. Possible values are: Private, Groups, Community. |
'Community' 'Groups' 'Private' |
SoftDeletePolicy
| Name |
Description |
Value |
| isSoftDeleteEnabled |
Enables soft-deletion for resources in this gallery, allowing them to be recovered within retention time. |
bool |
UserAssignedIdentitiesValue
Usage Examples
A basic example of deploying Shared Image Gallery.
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 = "westeurope"
}
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
___location = var.___location
body = {
properties = {
description = ""
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
Azure Verified Modules
The following Azure Verified Modules can be used to deploy this resource type.