GalleryImageVersionArgs

data class GalleryImageVersionArgs(val galleryImageName: Output<String>? = null, val galleryImageVersionName: Output<String>? = null, val galleryName: Output<String>? = null, val location: Output<String>? = null, val publishingProfile: Output<GalleryImageVersionPublishingProfileArgs>? = null, val resourceGroupName: Output<String>? = null, val storageProfile: Output<GalleryImageVersionStorageProfileArgs>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<GalleryImageVersionArgs>

Specifies information about the gallery image version that you want to create or update. API Version: 2020-09-30.

Example Usage

Create or update a simple Gallery Image Version using VM as source.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var galleryImageVersion = new AzureNative.Compute.GalleryImageVersion("galleryImageVersion", new()
{
GalleryImageName = "myGalleryImageName",
GalleryImageVersionName = "1.0.0",
GalleryName = "myGalleryName",
Location = "West US",
PublishingProfile = new AzureNative.Compute.Inputs.GalleryImageVersionPublishingProfileArgs
{
TargetRegions = new[]
{
new AzureNative.Compute.Inputs.TargetRegionArgs
{
Encryption = new AzureNative.Compute.Inputs.EncryptionImagesArgs
{
DataDiskImages = new[]
{
new AzureNative.Compute.Inputs.DataDiskImageEncryptionArgs
{
DiskEncryptionSetId = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet",
Lun = 0,
},
new AzureNative.Compute.Inputs.DataDiskImageEncryptionArgs
{
DiskEncryptionSetId = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet",
Lun = 1,
},
},
OsDiskImage = new AzureNative.Compute.Inputs.OSDiskImageEncryptionArgs
{
DiskEncryptionSetId = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet",
},
},
Name = "West US",
RegionalReplicaCount = 1,
},
new AzureNative.Compute.Inputs.TargetRegionArgs
{
Encryption = new AzureNative.Compute.Inputs.EncryptionImagesArgs
{
DataDiskImages = new[]
{
new AzureNative.Compute.Inputs.DataDiskImageEncryptionArgs
{
DiskEncryptionSetId = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet",
Lun = 0,
},
new AzureNative.Compute.Inputs.DataDiskImageEncryptionArgs
{
DiskEncryptionSetId = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet",
Lun = 1,
},
},
OsDiskImage = new AzureNative.Compute.Inputs.OSDiskImageEncryptionArgs
{
DiskEncryptionSetId = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet",
},
},
Name = "East US",
RegionalReplicaCount = 2,
StorageAccountType = "Standard_ZRS",
},
},
},
ResourceGroupName = "myResourceGroup",
StorageProfile = new AzureNative.Compute.Inputs.GalleryImageVersionStorageProfileArgs
{
Source = new AzureNative.Compute.Inputs.GalleryArtifactVersionSourceArgs
{
Id = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{vmName}",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.GalleryImageVersion;
import com.pulumi.azurenative.compute.GalleryImageVersionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var galleryImageVersion = new GalleryImageVersion("galleryImageVersion", GalleryImageVersionArgs.builder()
.galleryImageName("myGalleryImageName")
.galleryImageVersionName("1.0.0")
.galleryName("myGalleryName")
.location("West US")
.publishingProfile(Map.of("targetRegions",
Map.ofEntries(
Map.entry("encryption", Map.ofEntries(
Map.entry("dataDiskImages",
Map.ofEntries(
Map.entry("diskEncryptionSetId", "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet"),
Map.entry("lun", 0)
),
Map.ofEntries(
Map.entry("diskEncryptionSetId", "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet"),
Map.entry("lun", 1)
)),
Map.entry("osDiskImage", Map.of("diskEncryptionSetId", "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet"))
)),
Map.entry("name", "West US"),
Map.entry("regionalReplicaCount", 1)
),
Map.ofEntries(
Map.entry("encryption", Map.ofEntries(
Map.entry("dataDiskImages",
Map.ofEntries(
Map.entry("diskEncryptionSetId", "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet"),
Map.entry("lun", 0)
),
Map.ofEntries(
Map.entry("diskEncryptionSetId", "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet"),
Map.entry("lun", 1)
)),
Map.entry("osDiskImage", Map.of("diskEncryptionSetId", "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet"))
)),
Map.entry("name", "East US"),
Map.entry("regionalReplicaCount", 2),
Map.entry("storageAccountType", "Standard_ZRS")
)))
.resourceGroupName("myResourceGroup")
.storageProfile(Map.of("source", Map.of("id", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{vmName}")))
.build());
}
}

Create or update a simple Gallery Image Version using managed image as source.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var galleryImageVersion = new AzureNative.Compute.GalleryImageVersion("galleryImageVersion", new()
{
GalleryImageName = "myGalleryImageName",
GalleryImageVersionName = "1.0.0",
GalleryName = "myGalleryName",
Location = "West US",
PublishingProfile = new AzureNative.Compute.Inputs.GalleryImageVersionPublishingProfileArgs
{
TargetRegions = new[]
{
new AzureNative.Compute.Inputs.TargetRegionArgs
{
Encryption = new AzureNative.Compute.Inputs.EncryptionImagesArgs
{
DataDiskImages = new[]
{
new AzureNative.Compute.Inputs.DataDiskImageEncryptionArgs
{
DiskEncryptionSetId = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet",
Lun = 0,
},
new AzureNative.Compute.Inputs.DataDiskImageEncryptionArgs
{
DiskEncryptionSetId = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet",
Lun = 1,
},
},
OsDiskImage = new AzureNative.Compute.Inputs.OSDiskImageEncryptionArgs
{
DiskEncryptionSetId = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet",
},
},
Name = "West US",
RegionalReplicaCount = 1,
},
new AzureNative.Compute.Inputs.TargetRegionArgs
{
Encryption = new AzureNative.Compute.Inputs.EncryptionImagesArgs
{
DataDiskImages = new[]
{
new AzureNative.Compute.Inputs.DataDiskImageEncryptionArgs
{
DiskEncryptionSetId = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet",
Lun = 0,
},
new AzureNative.Compute.Inputs.DataDiskImageEncryptionArgs
{
DiskEncryptionSetId = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet",
Lun = 1,
},
},
OsDiskImage = new AzureNative.Compute.Inputs.OSDiskImageEncryptionArgs
{
DiskEncryptionSetId = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet",
},
},
Name = "East US",
RegionalReplicaCount = 2,
StorageAccountType = "Standard_ZRS",
},
},
},
ResourceGroupName = "myResourceGroup",
StorageProfile = new AzureNative.Compute.Inputs.GalleryImageVersionStorageProfileArgs
{
Source = new AzureNative.Compute.Inputs.GalleryArtifactVersionSourceArgs
{
Id = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.GalleryImageVersion;
import com.pulumi.azurenative.compute.GalleryImageVersionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var galleryImageVersion = new GalleryImageVersion("galleryImageVersion", GalleryImageVersionArgs.builder()
.galleryImageName("myGalleryImageName")
.galleryImageVersionName("1.0.0")
.galleryName("myGalleryName")
.location("West US")
.publishingProfile(Map.of("targetRegions",
Map.ofEntries(
Map.entry("encryption", Map.ofEntries(
Map.entry("dataDiskImages",
Map.ofEntries(
Map.entry("diskEncryptionSetId", "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet"),
Map.entry("lun", 0)
),
Map.ofEntries(
Map.entry("diskEncryptionSetId", "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet"),
Map.entry("lun", 1)
)),
Map.entry("osDiskImage", Map.of("diskEncryptionSetId", "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet"))
)),
Map.entry("name", "West US"),
Map.entry("regionalReplicaCount", 1)
),
Map.ofEntries(
Map.entry("encryption", Map.ofEntries(
Map.entry("dataDiskImages",
Map.ofEntries(
Map.entry("diskEncryptionSetId", "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet"),
Map.entry("lun", 0)
),
Map.ofEntries(
Map.entry("diskEncryptionSetId", "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet"),
Map.entry("lun", 1)
)),
Map.entry("osDiskImage", Map.of("diskEncryptionSetId", "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet"))
)),
Map.entry("name", "East US"),
Map.entry("regionalReplicaCount", 2),
Map.entry("storageAccountType", "Standard_ZRS")
)))
.resourceGroupName("myResourceGroup")
.storageProfile(Map.of("source", Map.of("id", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}")))
.build());
}
}

Create or update a simple Gallery Image Version using mix of disks and snapshots as a source.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var galleryImageVersion = new AzureNative.Compute.GalleryImageVersion("galleryImageVersion", new()
{
GalleryImageName = "myGalleryImageName",
GalleryImageVersionName = "1.0.0",
GalleryName = "myGalleryName",
Location = "West US",
PublishingProfile = new AzureNative.Compute.Inputs.GalleryImageVersionPublishingProfileArgs
{
TargetRegions = new[]
{
new AzureNative.Compute.Inputs.TargetRegionArgs
{
Encryption = new AzureNative.Compute.Inputs.EncryptionImagesArgs
{
DataDiskImages = new[]
{
new AzureNative.Compute.Inputs.DataDiskImageEncryptionArgs
{
DiskEncryptionSetId = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet",
Lun = 1,
},
},
OsDiskImage = new AzureNative.Compute.Inputs.OSDiskImageEncryptionArgs
{
DiskEncryptionSetId = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet",
},
},
Name = "West US",
RegionalReplicaCount = 1,
},
new AzureNative.Compute.Inputs.TargetRegionArgs
{
Encryption = new AzureNative.Compute.Inputs.EncryptionImagesArgs
{
DataDiskImages = new[]
{
new AzureNative.Compute.Inputs.DataDiskImageEncryptionArgs
{
DiskEncryptionSetId = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet",
Lun = 1,
},
},
OsDiskImage = new AzureNative.Compute.Inputs.OSDiskImageEncryptionArgs
{
DiskEncryptionSetId = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet",
},
},
Name = "East US",
RegionalReplicaCount = 2,
StorageAccountType = "Standard_ZRS",
},
},
},
ResourceGroupName = "myResourceGroup",
StorageProfile = new AzureNative.Compute.Inputs.GalleryImageVersionStorageProfileArgs
{
DataDiskImages = new[]
{
new AzureNative.Compute.Inputs.GalleryDataDiskImageArgs
{
HostCaching = AzureNative.Compute.HostCaching.None,
Lun = 1,
Source = new AzureNative.Compute.Inputs.GalleryArtifactVersionSourceArgs
{
Id = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/disks/{dataDiskName}",
},
},
},
OsDiskImage = new AzureNative.Compute.Inputs.GalleryOSDiskImageArgs
{
HostCaching = AzureNative.Compute.HostCaching.ReadOnly,
Source = new AzureNative.Compute.Inputs.GalleryArtifactVersionSourceArgs
{
Id = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/snapshots/{osSnapshotName}",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.GalleryImageVersion;
import com.pulumi.azurenative.compute.GalleryImageVersionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var galleryImageVersion = new GalleryImageVersion("galleryImageVersion", GalleryImageVersionArgs.builder()
.galleryImageName("myGalleryImageName")
.galleryImageVersionName("1.0.0")
.galleryName("myGalleryName")
.location("West US")
.publishingProfile(Map.of("targetRegions",
Map.ofEntries(
Map.entry("encryption", Map.ofEntries(
Map.entry("dataDiskImages", Map.ofEntries(
Map.entry("diskEncryptionSetId", "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet"),
Map.entry("lun", 1)
)),
Map.entry("osDiskImage", Map.of("diskEncryptionSetId", "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet"))
)),
Map.entry("name", "West US"),
Map.entry("regionalReplicaCount", 1)
),
Map.ofEntries(
Map.entry("encryption", Map.ofEntries(
Map.entry("dataDiskImages", Map.ofEntries(
Map.entry("diskEncryptionSetId", "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet"),
Map.entry("lun", 1)
)),
Map.entry("osDiskImage", Map.of("diskEncryptionSetId", "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet"))
)),
Map.entry("name", "East US"),
Map.entry("regionalReplicaCount", 2),
Map.entry("storageAccountType", "Standard_ZRS")
)))
.resourceGroupName("myResourceGroup")
.storageProfile(Map.ofEntries(
Map.entry("dataDiskImages", Map.ofEntries(
Map.entry("hostCaching", "None"),
Map.entry("lun", 1),
Map.entry("source", Map.of("id", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/disks/{dataDiskName}"))
)),
Map.entry("osDiskImage", Map.ofEntries(
Map.entry("hostCaching", "ReadOnly"),
Map.entry("source", Map.of("id", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/snapshots/{osSnapshotName}"))
))
))
.build());
}
}

Create or update a simple Gallery Image Version using shared image as source.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var galleryImageVersion = new AzureNative.Compute.GalleryImageVersion("galleryImageVersion", new()
{
GalleryImageName = "myGalleryImageName",
GalleryImageVersionName = "1.0.0",
GalleryName = "myGalleryName",
Location = "West US",
PublishingProfile = new AzureNative.Compute.Inputs.GalleryImageVersionPublishingProfileArgs
{
TargetRegions = new[]
{
new AzureNative.Compute.Inputs.TargetRegionArgs
{
Encryption = new AzureNative.Compute.Inputs.EncryptionImagesArgs
{
DataDiskImages = new[]
{
new AzureNative.Compute.Inputs.DataDiskImageEncryptionArgs
{
DiskEncryptionSetId = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet",
Lun = 0,
},
new AzureNative.Compute.Inputs.DataDiskImageEncryptionArgs
{
DiskEncryptionSetId = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet",
Lun = 1,
},
},
OsDiskImage = new AzureNative.Compute.Inputs.OSDiskImageEncryptionArgs
{
DiskEncryptionSetId = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet",
},
},
Name = "West US",
RegionalReplicaCount = 1,
},
new AzureNative.Compute.Inputs.TargetRegionArgs
{
Encryption = new AzureNative.Compute.Inputs.EncryptionImagesArgs
{
DataDiskImages = new[]
{
new AzureNative.Compute.Inputs.DataDiskImageEncryptionArgs
{
DiskEncryptionSetId = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet",
Lun = 0,
},
new AzureNative.Compute.Inputs.DataDiskImageEncryptionArgs
{
DiskEncryptionSetId = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet",
Lun = 1,
},
},
OsDiskImage = new AzureNative.Compute.Inputs.OSDiskImageEncryptionArgs
{
DiskEncryptionSetId = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet",
},
},
Name = "East US",
RegionalReplicaCount = 2,
StorageAccountType = "Standard_ZRS",
},
},
},
ResourceGroupName = "myResourceGroup",
StorageProfile = new AzureNative.Compute.Inputs.GalleryImageVersionStorageProfileArgs
{
Source = new AzureNative.Compute.Inputs.GalleryArtifactVersionSourceArgs
{
Id = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionName}",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.GalleryImageVersion;
import com.pulumi.azurenative.compute.GalleryImageVersionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var galleryImageVersion = new GalleryImageVersion("galleryImageVersion", GalleryImageVersionArgs.builder()
.galleryImageName("myGalleryImageName")
.galleryImageVersionName("1.0.0")
.galleryName("myGalleryName")
.location("West US")
.publishingProfile(Map.of("targetRegions",
Map.ofEntries(
Map.entry("encryption", Map.ofEntries(
Map.entry("dataDiskImages",
Map.ofEntries(
Map.entry("diskEncryptionSetId", "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet"),
Map.entry("lun", 0)
),
Map.ofEntries(
Map.entry("diskEncryptionSetId", "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet"),
Map.entry("lun", 1)
)),
Map.entry("osDiskImage", Map.of("diskEncryptionSetId", "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet"))
)),
Map.entry("name", "West US"),
Map.entry("regionalReplicaCount", 1)
),
Map.ofEntries(
Map.entry("encryption", Map.ofEntries(
Map.entry("dataDiskImages",
Map.ofEntries(
Map.entry("diskEncryptionSetId", "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet"),
Map.entry("lun", 0)
),
Map.ofEntries(
Map.entry("diskEncryptionSetId", "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet"),
Map.entry("lun", 1)
)),
Map.entry("osDiskImage", Map.of("diskEncryptionSetId", "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet"))
)),
Map.entry("name", "East US"),
Map.entry("regionalReplicaCount", 2),
Map.entry("storageAccountType", "Standard_ZRS")
)))
.resourceGroupName("myResourceGroup")
.storageProfile(Map.of("source", Map.of("id", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionName}")))
.build());
}
}

Create or update a simple Gallery Image Version using vhd as a source.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var galleryImageVersion = new AzureNative.Compute.GalleryImageVersion("galleryImageVersion", new()
{
GalleryImageName = "myGalleryImageName",
GalleryImageVersionName = "1.0.0",
GalleryName = "myGalleryName",
Location = "West US",
PublishingProfile = new AzureNative.Compute.Inputs.GalleryImageVersionPublishingProfileArgs
{
TargetRegions = new[]
{
new AzureNative.Compute.Inputs.TargetRegionArgs
{
Encryption = new AzureNative.Compute.Inputs.EncryptionImagesArgs
{
DataDiskImages = new[]
{
new AzureNative.Compute.Inputs.DataDiskImageEncryptionArgs
{
DiskEncryptionSetId = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherDiskEncryptionSet",
Lun = 1,
},
},
OsDiskImage = new AzureNative.Compute.Inputs.OSDiskImageEncryptionArgs
{
DiskEncryptionSetId = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet",
},
},
Name = "West US",
RegionalReplicaCount = 1,
},
new AzureNative.Compute.Inputs.TargetRegionArgs
{
Name = "East US",
RegionalReplicaCount = 2,
StorageAccountType = "Standard_ZRS",
},
},
},
ResourceGroupName = "myResourceGroup",
StorageProfile = new AzureNative.Compute.Inputs.GalleryImageVersionStorageProfileArgs
{
DataDiskImages = new[]
{
new AzureNative.Compute.Inputs.GalleryDataDiskImageArgs
{
HostCaching = AzureNative.Compute.HostCaching.None,
Lun = 1,
Source = new AzureNative.Compute.Inputs.GalleryArtifactVersionSourceArgs
{
Id = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}",
Uri = "https://gallerysourcencus.blob.core.windows.net/myvhds/Windows-Server-2012-R2-20171216-en.us-128GB.vhd",
},
},
},
OsDiskImage = new AzureNative.Compute.Inputs.GalleryOSDiskImageArgs
{
HostCaching = AzureNative.Compute.HostCaching.ReadOnly,
Source = new AzureNative.Compute.Inputs.GalleryArtifactVersionSourceArgs
{
Id = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}",
Uri = "https://gallerysourcencus.blob.core.windows.net/myvhds/Windows-Server-2012-R2-20171216-en.us-128GB.vhd",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.GalleryImageVersion;
import com.pulumi.azurenative.compute.GalleryImageVersionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var galleryImageVersion = new GalleryImageVersion("galleryImageVersion", GalleryImageVersionArgs.builder()
.galleryImageName("myGalleryImageName")
.galleryImageVersionName("1.0.0")
.galleryName("myGalleryName")
.location("West US")
.publishingProfile(Map.of("targetRegions",
Map.ofEntries(
Map.entry("encryption", Map.ofEntries(
Map.entry("dataDiskImages", Map.ofEntries(
Map.entry("diskEncryptionSetId", "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherDiskEncryptionSet"),
Map.entry("lun", 1)
)),
Map.entry("osDiskImage", Map.of("diskEncryptionSetId", "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet"))
)),
Map.entry("name", "West US"),
Map.entry("regionalReplicaCount", 1)
),
Map.ofEntries(
Map.entry("name", "East US"),
Map.entry("regionalReplicaCount", 2),
Map.entry("storageAccountType", "Standard_ZRS")
)))
.resourceGroupName("myResourceGroup")
.storageProfile(Map.ofEntries(
Map.entry("dataDiskImages", Map.ofEntries(
Map.entry("hostCaching", "None"),
Map.entry("lun", 1),
Map.entry("source", Map.ofEntries(
Map.entry("id", "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}"),
Map.entry("uri", "https://gallerysourcencus.blob.core.windows.net/myvhds/Windows-Server-2012-R2-20171216-en.us-128GB.vhd")
))
)),
Map.entry("osDiskImage", Map.ofEntries(
Map.entry("hostCaching", "ReadOnly"),
Map.entry("source", Map.ofEntries(
Map.entry("id", "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}"),
Map.entry("uri", "https://gallerysourcencus.blob.core.windows.net/myvhds/Windows-Server-2012-R2-20171216-en.us-128GB.vhd")
))
))
))
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:compute:GalleryImageVersion 1.0.0 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}

Constructors

Link copied to clipboard
constructor(galleryImageName: Output<String>? = null, galleryImageVersionName: Output<String>? = null, galleryName: Output<String>? = null, location: Output<String>? = null, publishingProfile: Output<GalleryImageVersionPublishingProfileArgs>? = null, resourceGroupName: Output<String>? = null, storageProfile: Output<GalleryImageVersionStorageProfileArgs>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val galleryImageName: Output<String>? = null

The name of the gallery image definition in which the Image Version is to be created.

Link copied to clipboard
val galleryImageVersionName: Output<String>? = null

The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: ..

Link copied to clipboard
val galleryName: Output<String>? = null

The name of the Shared Image Gallery in which the Image Definition resides.

Link copied to clipboard
val location: Output<String>? = null

Resource location

Link copied to clipboard

The publishing profile of a gallery image Version.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group.

Link copied to clipboard

This is the storage profile of a Gallery Image Version.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Resource tags

Functions

Link copied to clipboard
open override fun toJava(): GalleryImageVersionArgs