Skip to content

Commit c95c3d5

Browse files
added sharedimageversion template and properties, and missing bicep examples
1 parent fbf4bd7 commit c95c3d5

File tree

1 file changed

+57
-27
lines changed

1 file changed

+57
-27
lines changed

articles/virtual-machines/linux/image-builder-json.md

Lines changed: 57 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -927,19 +927,10 @@ The following JSON is an example of how to use the `replicationRegions` field to
927927

928928
# [Bicep](#tab/bicep)
929929
```bicep
930-
{
931-
type: 'SharedImage'
932-
galleryImageId: '<resource ID>'
933-
runOutputName: '<name>'
934-
artifactTags: {
935-
<name>: '<value>'
936-
<name>: '<value>'
937-
}
938-
replicationRegions: [
939-
'<region where the gallery is deployed>'
940-
'<region>'
941-
]
942-
}
930+
replicationRegions: [
931+
'<region where the gallery is deployed>',
932+
'<region>'
933+
]
943934
```
944935
---
945936

@@ -978,17 +969,28 @@ The following JSON is an example of how to use the targetRegions field to distri
978969
```
979970
# [Bicep](#tab/bicep)
980971
```bicep
981-
param targetRegions array = [
982-
{
983-
name: 'eastus'
984-
replicaCount: 2
985-
storageAccountType: 'Standard_ZRS'
986-
}
987-
{
988-
name: 'eastus2'
989-
replicaCount: 3
990-
storageAccountType: 'Premium_LRS'
991-
}
972+
distribute: [
973+
{
974+
type: 'SharedImage'
975+
galleryImageId: '<resource ID>'
976+
runOutputName: '<name>'
977+
artifactTags: {
978+
'<name>': '<value>'
979+
'<name>': '<value>'
980+
}
981+
targetRegions: [
982+
{
983+
name: 'eastus'
984+
replicaCount: 2
985+
storageAccountType: 'Standard_ZRS'
986+
}
987+
{
988+
name: 'eastus2'
989+
replicaCount: 3
990+
storageAccountType: 'Premium_LRS'
991+
}
992+
]
993+
}
992994
]
993995
```
994996
---
@@ -1270,15 +1272,14 @@ Sets the source image as an existing image version in an Azure Compute Gallery.
12701272

12711273
```bicep
12721274
source: {
1273-
type: 'SharedImageVersion',
1274-
imageVersionID: '<replace with resourceId of the image stored in the Direct Shared Gallery>'
1275+
type: 'SharedImageVersion'
1276+
imageVersionId: '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroup>/providers/Microsoft.Compute/galleries/<sharedImageGalleryName>/images/<imageDefinitionName>/versions/<imageVersion>'
12751277
}
12761278
```
12771279

12781280
---
12791281
- imageVersionId - ARM resource id of the image version. When image version name is 'latest', the version is evaluated when the image build takes place. The `imageVersionId` should be the `ResourceId` of the image version. Use [az sig image-version list](/cli/azure/sig/image-version#az-sig-image-version-list) to list image versions.
12801282

1281-
### SharedImageVersion
12821283

12831284
The following JSON sets the source image as an image stored in a [Direct Shared Gallery](/azure/virtual-machines/shared-image-galleries?tabs=azure-cli#sharing).
12841285

@@ -1304,6 +1305,35 @@ source: {
13041305
```
13051306
---
13061307

1308+
The following JSON sets the source image as the latest image version for an image stored in an Azure Compute Gallery.
1309+
1310+
# [JSON](#tab/json)
1311+
1312+
```json
1313+
"properties": {
1314+
"source": {
1315+
"type": "SharedImageVersion",
1316+
"imageVersionId": "/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Compute/galleries/<azureComputeGalleryName>/images/<imageDefinitionName>/versions/latest"
1317+
}
1318+
},
1319+
```
1320+
1321+
# [Bicep](#tab/bicep)
1322+
1323+
```bicep
1324+
properties: {
1325+
source: {
1326+
type: 'SharedImageVersion'
1327+
imageVersionId: '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Compute/galleries/<azureComputeGalleryName>/images/<imageDefinitionName>/versions/latest'
1328+
}
1329+
}
1330+
```
1331+
---
1332+
1333+
SharedImageVersion properties:
1334+
1335+
**imageVersionId** - ARM resource id of the image version. When the image version name is 'latest', the version is evaluated when the image build takes place.
1336+
13071337

13081338
## Properties: stagingResourceGroup
13091339

0 commit comments

Comments
 (0)