The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.
Uses Azure REST API version 2024-11-01. In version 2.x of the Azure Native provider, it used API version 2023-03-01.
Other available API versions: 2022-08-01, 2022-11-01, 2023-03-01, 2023-07-01, 2023-09-01, 2024-03-01, 2024-07-01, 2025-04-01, 2025-11-01, 2026-03-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native compute [ApiVersion]. See the version guide for details.
Example Usage
Create a virtual machine image from a blob with DiskEncryptionSet resource.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var image = new AzureNative.Compute.Image("image", new()
{
ImageName = "myImage",
Location = "West US",
ResourceGroupName = "myResourceGroup",
StorageProfile = new AzureNative.Compute.Inputs.ImageStorageProfileArgs
{
OsDisk = new AzureNative.Compute.Inputs.ImageOSDiskArgs
{
BlobUri = "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
DiskEncryptionSet = new AzureNative.Compute.Inputs.DiskEncryptionSetParametersArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}",
},
OsState = AzureNative.Compute.OperatingSystemStateTypes.Generalized,
OsType = AzureNative.Compute.OperatingSystemTypes.Linux,
},
},
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewImage(ctx, "image", &compute.ImageArgs{
ImageName: pulumi.String("myImage"),
Location: pulumi.String("West US"),
ResourceGroupName: pulumi.String("myResourceGroup"),
StorageProfile: &compute.ImageStorageProfileArgs{
OsDisk: &compute.ImageOSDiskArgs{
BlobUri: pulumi.String("https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd"),
DiskEncryptionSet: &compute.DiskEncryptionSetParametersArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"),
},
OsState: compute.OperatingSystemStateTypesGeneralized,
OsType: compute.OperatingSystemTypesLinux,
},
},
})
if err != nil {
return err
}
return nil
})
}
terraform {
required_providers {
azure-native = {
source = "pulumi/azure-native"
}
}
}
resource "azure-native_compute_image" "image" {
lifecycle {
create_before_destroy = true
}
image_name = "myImage"
location = "West US"
resource_group_name = "myResourceGroup"
storage_profile = {
os_disk = {
blob_uri = "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd"
disk_encryption_set = {
id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
}
os_state = "Generalized"
os_type = "Linux"
}
}
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.Image;
import com.pulumi.azurenative.compute.ImageArgs;
import com.pulumi.azurenative.compute.inputs.ImageStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.DiskEncryptionSetParametersArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 image = new Image("image", ImageArgs.builder()
.imageName("myImage")
.location("West US")
.resourceGroupName("myResourceGroup")
.storageProfile(ImageStorageProfileArgs.builder()
.osDisk(ImageOSDiskArgs.builder()
.blobUri("https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd")
.diskEncryptionSet(DiskEncryptionSetParametersArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}")
.build())
.osState("Generalized")
.osType("Linux")
.build())
.build())
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const image = new azure_native.compute.Image("image", {
imageName: "myImage",
location: "West US",
resourceGroupName: "myResourceGroup",
storageProfile: {
osDisk: {
blobUri: "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
diskEncryptionSet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}",
},
osState: azure_native.compute.OperatingSystemStateTypes.Generalized,
osType: azure_native.compute.OperatingSystemTypes.Linux,
},
},
});
import pulumi
import pulumi_azure_native as azure_native
image = azure_native.compute.Image("image",
image_name="myImage",
location="West US",
resource_group_name="myResourceGroup",
storage_profile={
"os_disk": {
"blob_uri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
"disk_encryption_set": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}",
},
"os_state": azure_native.compute.OperatingSystemStateTypes.GENERALIZED,
"os_type": azure_native.compute.OperatingSystemTypes.LINUX,
},
})
resources:
image:
type: azure-native:compute:Image
properties:
imageName: myImage
location: West US
resourceGroupName: myResourceGroup
storageProfile:
osDisk:
blobUri: https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd
diskEncryptionSet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}
osState: Generalized
osType: Linux
Create a virtual machine image from a blob.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var image = new AzureNative.Compute.Image("image", new()
{
ImageName = "myImage",
Location = "West US",
ResourceGroupName = "myResourceGroup",
StorageProfile = new AzureNative.Compute.Inputs.ImageStorageProfileArgs
{
OsDisk = new AzureNative.Compute.Inputs.ImageOSDiskArgs
{
BlobUri = "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
OsState = AzureNative.Compute.OperatingSystemStateTypes.Generalized,
OsType = AzureNative.Compute.OperatingSystemTypes.Linux,
},
ZoneResilient = true,
},
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewImage(ctx, "image", &compute.ImageArgs{
ImageName: pulumi.String("myImage"),
Location: pulumi.String("West US"),
ResourceGroupName: pulumi.String("myResourceGroup"),
StorageProfile: &compute.ImageStorageProfileArgs{
OsDisk: &compute.ImageOSDiskArgs{
BlobUri: pulumi.String("https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd"),
OsState: compute.OperatingSystemStateTypesGeneralized,
OsType: compute.OperatingSystemTypesLinux,
},
ZoneResilient: pulumi.Bool(true),
},
})
if err != nil {
return err
}
return nil
})
}
terraform {
required_providers {
azure-native = {
source = "pulumi/azure-native"
}
}
}
resource "azure-native_compute_image" "image" {
lifecycle {
create_before_destroy = true
}
image_name = "myImage"
location = "West US"
resource_group_name = "myResourceGroup"
storage_profile = {
os_disk = {
blob_uri = "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd"
os_state = "Generalized"
os_type = "Linux"
}
zone_resilient = true
}
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.Image;
import com.pulumi.azurenative.compute.ImageArgs;
import com.pulumi.azurenative.compute.inputs.ImageStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageOSDiskArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 image = new Image("image", ImageArgs.builder()
.imageName("myImage")
.location("West US")
.resourceGroupName("myResourceGroup")
.storageProfile(ImageStorageProfileArgs.builder()
.osDisk(ImageOSDiskArgs.builder()
.blobUri("https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd")
.osState("Generalized")
.osType("Linux")
.build())
.zoneResilient(true)
.build())
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const image = new azure_native.compute.Image("image", {
imageName: "myImage",
location: "West US",
resourceGroupName: "myResourceGroup",
storageProfile: {
osDisk: {
blobUri: "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
osState: azure_native.compute.OperatingSystemStateTypes.Generalized,
osType: azure_native.compute.OperatingSystemTypes.Linux,
},
zoneResilient: true,
},
});
import pulumi
import pulumi_azure_native as azure_native
image = azure_native.compute.Image("image",
image_name="myImage",
location="West US",
resource_group_name="myResourceGroup",
storage_profile={
"os_disk": {
"blob_uri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
"os_state": azure_native.compute.OperatingSystemStateTypes.GENERALIZED,
"os_type": azure_native.compute.OperatingSystemTypes.LINUX,
},
"zone_resilient": True,
})
resources:
image:
type: azure-native:compute:Image
properties:
imageName: myImage
location: West US
resourceGroupName: myResourceGroup
storageProfile:
osDisk:
blobUri: https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd
osState: Generalized
osType: Linux
zoneResilient: true
Create a virtual machine image from a managed disk with DiskEncryptionSet resource.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var image = new AzureNative.Compute.Image("image", new()
{
ImageName = "myImage",
Location = "West US",
ResourceGroupName = "myResourceGroup",
StorageProfile = new AzureNative.Compute.Inputs.ImageStorageProfileArgs
{
OsDisk = new AzureNative.Compute.Inputs.ImageOSDiskArgs
{
DiskEncryptionSet = new AzureNative.Compute.Inputs.DiskEncryptionSetParametersArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}",
},
OsState = AzureNative.Compute.OperatingSystemStateTypes.Generalized,
OsType = AzureNative.Compute.OperatingSystemTypes.Linux,
Snapshot = new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot",
},
},
},
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewImage(ctx, "image", &compute.ImageArgs{
ImageName: pulumi.String("myImage"),
Location: pulumi.String("West US"),
ResourceGroupName: pulumi.String("myResourceGroup"),
StorageProfile: &compute.ImageStorageProfileArgs{
OsDisk: &compute.ImageOSDiskArgs{
DiskEncryptionSet: &compute.DiskEncryptionSetParametersArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"),
},
OsState: compute.OperatingSystemStateTypesGeneralized,
OsType: compute.OperatingSystemTypesLinux,
Snapshot: &compute.SubResourceArgs{
Id: pulumi.String("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
terraform {
required_providers {
azure-native = {
source = "pulumi/azure-native"
}
}
}
resource "azure-native_compute_image" "image" {
lifecycle {
create_before_destroy = true
}
image_name = "myImage"
location = "West US"
resource_group_name = "myResourceGroup"
storage_profile = {
os_disk = {
disk_encryption_set = {
id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
}
os_state = "Generalized"
os_type = "Linux"
snapshot = {
id = "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"
}
}
}
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.Image;
import com.pulumi.azurenative.compute.ImageArgs;
import com.pulumi.azurenative.compute.inputs.ImageStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.DiskEncryptionSetParametersArgs;
import com.pulumi.azurenative.compute.inputs.SubResourceArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 image = new Image("image", ImageArgs.builder()
.imageName("myImage")
.location("West US")
.resourceGroupName("myResourceGroup")
.storageProfile(ImageStorageProfileArgs.builder()
.osDisk(ImageOSDiskArgs.builder()
.diskEncryptionSet(DiskEncryptionSetParametersArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}")
.build())
.osState("Generalized")
.osType("Linux")
.snapshot(SubResourceArgs.builder()
.id("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot")
.build())
.build())
.build())
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const image = new azure_native.compute.Image("image", {
imageName: "myImage",
location: "West US",
resourceGroupName: "myResourceGroup",
storageProfile: {
osDisk: {
diskEncryptionSet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}",
},
osState: azure_native.compute.OperatingSystemStateTypes.Generalized,
osType: azure_native.compute.OperatingSystemTypes.Linux,
snapshot: {
id: "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot",
},
},
},
});
import pulumi
import pulumi_azure_native as azure_native
image = azure_native.compute.Image("image",
image_name="myImage",
location="West US",
resource_group_name="myResourceGroup",
storage_profile={
"os_disk": {
"disk_encryption_set": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}",
},
"os_state": azure_native.compute.OperatingSystemStateTypes.GENERALIZED,
"os_type": azure_native.compute.OperatingSystemTypes.LINUX,
"snapshot": {
"id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot",
},
},
})
resources:
image:
type: azure-native:compute:Image
properties:
imageName: myImage
location: West US
resourceGroupName: myResourceGroup
storageProfile:
osDisk:
diskEncryptionSet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}
osState: Generalized
osType: Linux
snapshot:
id: subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot
Create a virtual machine image from a managed disk.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var image = new AzureNative.Compute.Image("image", new()
{
ImageName = "myImage",
Location = "West US",
ResourceGroupName = "myResourceGroup",
StorageProfile = new AzureNative.Compute.Inputs.ImageStorageProfileArgs
{
OsDisk = new AzureNative.Compute.Inputs.ImageOSDiskArgs
{
ManagedDisk = new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk",
},
OsState = AzureNative.Compute.OperatingSystemStateTypes.Generalized,
OsType = AzureNative.Compute.OperatingSystemTypes.Linux,
},
ZoneResilient = true,
},
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewImage(ctx, "image", &compute.ImageArgs{
ImageName: pulumi.String("myImage"),
Location: pulumi.String("West US"),
ResourceGroupName: pulumi.String("myResourceGroup"),
StorageProfile: &compute.ImageStorageProfileArgs{
OsDisk: &compute.ImageOSDiskArgs{
ManagedDisk: &compute.SubResourceArgs{
Id: pulumi.String("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk"),
},
OsState: compute.OperatingSystemStateTypesGeneralized,
OsType: compute.OperatingSystemTypesLinux,
},
ZoneResilient: pulumi.Bool(true),
},
})
if err != nil {
return err
}
return nil
})
}
terraform {
required_providers {
azure-native = {
source = "pulumi/azure-native"
}
}
}
resource "azure-native_compute_image" "image" {
lifecycle {
create_before_destroy = true
}
image_name = "myImage"
location = "West US"
resource_group_name = "myResourceGroup"
storage_profile = {
os_disk = {
managed_disk = {
id = "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk"
}
os_state = "Generalized"
os_type = "Linux"
}
zone_resilient = true
}
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.Image;
import com.pulumi.azurenative.compute.ImageArgs;
import com.pulumi.azurenative.compute.inputs.ImageStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.SubResourceArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 image = new Image("image", ImageArgs.builder()
.imageName("myImage")
.location("West US")
.resourceGroupName("myResourceGroup")
.storageProfile(ImageStorageProfileArgs.builder()
.osDisk(ImageOSDiskArgs.builder()
.managedDisk(SubResourceArgs.builder()
.id("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk")
.build())
.osState("Generalized")
.osType("Linux")
.build())
.zoneResilient(true)
.build())
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const image = new azure_native.compute.Image("image", {
imageName: "myImage",
location: "West US",
resourceGroupName: "myResourceGroup",
storageProfile: {
osDisk: {
managedDisk: {
id: "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk",
},
osState: azure_native.compute.OperatingSystemStateTypes.Generalized,
osType: azure_native.compute.OperatingSystemTypes.Linux,
},
zoneResilient: true,
},
});
import pulumi
import pulumi_azure_native as azure_native
image = azure_native.compute.Image("image",
image_name="myImage",
location="West US",
resource_group_name="myResourceGroup",
storage_profile={
"os_disk": {
"managed_disk": {
"id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk",
},
"os_state": azure_native.compute.OperatingSystemStateTypes.GENERALIZED,
"os_type": azure_native.compute.OperatingSystemTypes.LINUX,
},
"zone_resilient": True,
})
resources:
image:
type: azure-native:compute:Image
properties:
imageName: myImage
location: West US
resourceGroupName: myResourceGroup
storageProfile:
osDisk:
managedDisk:
id: subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk
osState: Generalized
osType: Linux
zoneResilient: true
Create a virtual machine image from a snapshot with DiskEncryptionSet resource.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var image = new AzureNative.Compute.Image("image", new()
{
ImageName = "myImage",
Location = "West US",
ResourceGroupName = "myResourceGroup",
StorageProfile = new AzureNative.Compute.Inputs.ImageStorageProfileArgs
{
OsDisk = new AzureNative.Compute.Inputs.ImageOSDiskArgs
{
DiskEncryptionSet = new AzureNative.Compute.Inputs.DiskEncryptionSetParametersArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}",
},
ManagedDisk = new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk",
},
OsState = AzureNative.Compute.OperatingSystemStateTypes.Generalized,
OsType = AzureNative.Compute.OperatingSystemTypes.Linux,
},
},
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewImage(ctx, "image", &compute.ImageArgs{
ImageName: pulumi.String("myImage"),
Location: pulumi.String("West US"),
ResourceGroupName: pulumi.String("myResourceGroup"),
StorageProfile: &compute.ImageStorageProfileArgs{
OsDisk: &compute.ImageOSDiskArgs{
DiskEncryptionSet: &compute.DiskEncryptionSetParametersArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"),
},
ManagedDisk: &compute.SubResourceArgs{
Id: pulumi.String("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk"),
},
OsState: compute.OperatingSystemStateTypesGeneralized,
OsType: compute.OperatingSystemTypesLinux,
},
},
})
if err != nil {
return err
}
return nil
})
}
terraform {
required_providers {
azure-native = {
source = "pulumi/azure-native"
}
}
}
resource "azure-native_compute_image" "image" {
lifecycle {
create_before_destroy = true
}
image_name = "myImage"
location = "West US"
resource_group_name = "myResourceGroup"
storage_profile = {
os_disk = {
disk_encryption_set = {
id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
}
managed_disk = {
id = "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk"
}
os_state = "Generalized"
os_type = "Linux"
}
}
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.Image;
import com.pulumi.azurenative.compute.ImageArgs;
import com.pulumi.azurenative.compute.inputs.ImageStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.DiskEncryptionSetParametersArgs;
import com.pulumi.azurenative.compute.inputs.SubResourceArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 image = new Image("image", ImageArgs.builder()
.imageName("myImage")
.location("West US")
.resourceGroupName("myResourceGroup")
.storageProfile(ImageStorageProfileArgs.builder()
.osDisk(ImageOSDiskArgs.builder()
.diskEncryptionSet(DiskEncryptionSetParametersArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}")
.build())
.managedDisk(SubResourceArgs.builder()
.id("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk")
.build())
.osState("Generalized")
.osType("Linux")
.build())
.build())
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const image = new azure_native.compute.Image("image", {
imageName: "myImage",
location: "West US",
resourceGroupName: "myResourceGroup",
storageProfile: {
osDisk: {
diskEncryptionSet: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}",
},
managedDisk: {
id: "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk",
},
osState: azure_native.compute.OperatingSystemStateTypes.Generalized,
osType: azure_native.compute.OperatingSystemTypes.Linux,
},
},
});
import pulumi
import pulumi_azure_native as azure_native
image = azure_native.compute.Image("image",
image_name="myImage",
location="West US",
resource_group_name="myResourceGroup",
storage_profile={
"os_disk": {
"disk_encryption_set": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}",
},
"managed_disk": {
"id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk",
},
"os_state": azure_native.compute.OperatingSystemStateTypes.GENERALIZED,
"os_type": azure_native.compute.OperatingSystemTypes.LINUX,
},
})
resources:
image:
type: azure-native:compute:Image
properties:
imageName: myImage
location: West US
resourceGroupName: myResourceGroup
storageProfile:
osDisk:
diskEncryptionSet:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}
managedDisk:
id: subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk
osState: Generalized
osType: Linux
Create a virtual machine image from a snapshot.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var image = new AzureNative.Compute.Image("image", new()
{
ImageName = "myImage",
Location = "West US",
ResourceGroupName = "myResourceGroup",
StorageProfile = new AzureNative.Compute.Inputs.ImageStorageProfileArgs
{
OsDisk = new AzureNative.Compute.Inputs.ImageOSDiskArgs
{
OsState = AzureNative.Compute.OperatingSystemStateTypes.Generalized,
OsType = AzureNative.Compute.OperatingSystemTypes.Linux,
Snapshot = new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot",
},
},
ZoneResilient = false,
},
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewImage(ctx, "image", &compute.ImageArgs{
ImageName: pulumi.String("myImage"),
Location: pulumi.String("West US"),
ResourceGroupName: pulumi.String("myResourceGroup"),
StorageProfile: &compute.ImageStorageProfileArgs{
OsDisk: &compute.ImageOSDiskArgs{
OsState: compute.OperatingSystemStateTypesGeneralized,
OsType: compute.OperatingSystemTypesLinux,
Snapshot: &compute.SubResourceArgs{
Id: pulumi.String("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"),
},
},
ZoneResilient: pulumi.Bool(false),
},
})
if err != nil {
return err
}
return nil
})
}
terraform {
required_providers {
azure-native = {
source = "pulumi/azure-native"
}
}
}
resource "azure-native_compute_image" "image" {
lifecycle {
create_before_destroy = true
}
image_name = "myImage"
location = "West US"
resource_group_name = "myResourceGroup"
storage_profile = {
os_disk = {
os_state = "Generalized"
os_type = "Linux"
snapshot = {
id = "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"
}
}
zone_resilient = false
}
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.Image;
import com.pulumi.azurenative.compute.ImageArgs;
import com.pulumi.azurenative.compute.inputs.ImageStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageOSDiskArgs;
import com.pulumi.azurenative.compute.inputs.SubResourceArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 image = new Image("image", ImageArgs.builder()
.imageName("myImage")
.location("West US")
.resourceGroupName("myResourceGroup")
.storageProfile(ImageStorageProfileArgs.builder()
.osDisk(ImageOSDiskArgs.builder()
.osState("Generalized")
.osType("Linux")
.snapshot(SubResourceArgs.builder()
.id("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot")
.build())
.build())
.zoneResilient(false)
.build())
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const image = new azure_native.compute.Image("image", {
imageName: "myImage",
location: "West US",
resourceGroupName: "myResourceGroup",
storageProfile: {
osDisk: {
osState: azure_native.compute.OperatingSystemStateTypes.Generalized,
osType: azure_native.compute.OperatingSystemTypes.Linux,
snapshot: {
id: "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot",
},
},
zoneResilient: false,
},
});
import pulumi
import pulumi_azure_native as azure_native
image = azure_native.compute.Image("image",
image_name="myImage",
location="West US",
resource_group_name="myResourceGroup",
storage_profile={
"os_disk": {
"os_state": azure_native.compute.OperatingSystemStateTypes.GENERALIZED,
"os_type": azure_native.compute.OperatingSystemTypes.LINUX,
"snapshot": {
"id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot",
},
},
"zone_resilient": False,
})
resources:
image:
type: azure-native:compute:Image
properties:
imageName: myImage
location: West US
resourceGroupName: myResourceGroup
storageProfile:
osDisk:
osState: Generalized
osType: Linux
snapshot:
id: subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot
zoneResilient: false
Create a virtual machine image from an existing virtual machine.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var image = new AzureNative.Compute.Image("image", new()
{
ImageName = "myImage",
Location = "West US",
ResourceGroupName = "myResourceGroup",
SourceVirtualMachine = new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
},
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewImage(ctx, "image", &compute.ImageArgs{
ImageName: pulumi.String("myImage"),
Location: pulumi.String("West US"),
ResourceGroupName: pulumi.String("myResourceGroup"),
SourceVirtualMachine: &compute.SubResourceArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM"),
},
})
if err != nil {
return err
}
return nil
})
}
terraform {
required_providers {
azure-native = {
source = "pulumi/azure-native"
}
}
}
resource "azure-native_compute_image" "image" {
lifecycle {
create_before_destroy = true
}
image_name = "myImage"
location = "West US"
resource_group_name = "myResourceGroup"
source_virtual_machine = {
id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM"
}
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.Image;
import com.pulumi.azurenative.compute.ImageArgs;
import com.pulumi.azurenative.compute.inputs.SubResourceArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 image = new Image("image", ImageArgs.builder()
.imageName("myImage")
.location("West US")
.resourceGroupName("myResourceGroup")
.sourceVirtualMachine(SubResourceArgs.builder()
.id("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM")
.build())
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const image = new azure_native.compute.Image("image", {
imageName: "myImage",
location: "West US",
resourceGroupName: "myResourceGroup",
sourceVirtualMachine: {
id: "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
},
});
import pulumi
import pulumi_azure_native as azure_native
image = azure_native.compute.Image("image",
image_name="myImage",
location="West US",
resource_group_name="myResourceGroup",
source_virtual_machine={
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
})
resources:
image:
type: azure-native:compute:Image
properties:
imageName: myImage
location: West US
resourceGroupName: myResourceGroup
sourceVirtualMachine:
id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM
Create a virtual machine image that includes a data disk from a blob.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var image = new AzureNative.Compute.Image("image", new()
{
ImageName = "myImage",
Location = "West US",
ResourceGroupName = "myResourceGroup",
StorageProfile = new AzureNative.Compute.Inputs.ImageStorageProfileArgs
{
DataDisks = new[]
{
new AzureNative.Compute.Inputs.ImageDataDiskArgs
{
BlobUri = "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd",
Lun = 1,
},
},
OsDisk = new AzureNative.Compute.Inputs.ImageOSDiskArgs
{
BlobUri = "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
OsState = AzureNative.Compute.OperatingSystemStateTypes.Generalized,
OsType = AzureNative.Compute.OperatingSystemTypes.Linux,
},
ZoneResilient = false,
},
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewImage(ctx, "image", &compute.ImageArgs{
ImageName: pulumi.String("myImage"),
Location: pulumi.String("West US"),
ResourceGroupName: pulumi.String("myResourceGroup"),
StorageProfile: &compute.ImageStorageProfileArgs{
DataDisks: compute.ImageDataDiskArray{
&compute.ImageDataDiskArgs{
BlobUri: pulumi.String("https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd"),
Lun: pulumi.Int(1),
},
},
OsDisk: &compute.ImageOSDiskArgs{
BlobUri: pulumi.String("https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd"),
OsState: compute.OperatingSystemStateTypesGeneralized,
OsType: compute.OperatingSystemTypesLinux,
},
ZoneResilient: pulumi.Bool(false),
},
})
if err != nil {
return err
}
return nil
})
}
terraform {
required_providers {
azure-native = {
source = "pulumi/azure-native"
}
}
}
resource "azure-native_compute_image" "image" {
lifecycle {
create_before_destroy = true
}
image_name = "myImage"
location = "West US"
resource_group_name = "myResourceGroup"
storage_profile = {
data_disks = [{
blob_uri = "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd"
lun = 1
}]
os_disk = {
blob_uri = "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd"
os_state = "Generalized"
os_type = "Linux"
}
zone_resilient = false
}
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.Image;
import com.pulumi.azurenative.compute.ImageArgs;
import com.pulumi.azurenative.compute.inputs.ImageStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageDataDiskArgs;
import com.pulumi.azurenative.compute.inputs.ImageOSDiskArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 image = new Image("image", ImageArgs.builder()
.imageName("myImage")
.location("West US")
.resourceGroupName("myResourceGroup")
.storageProfile(ImageStorageProfileArgs.builder()
.dataDisks(ImageDataDiskArgs.builder()
.blobUri("https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd")
.lun(1)
.build())
.osDisk(ImageOSDiskArgs.builder()
.blobUri("https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd")
.osState("Generalized")
.osType("Linux")
.build())
.zoneResilient(false)
.build())
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const image = new azure_native.compute.Image("image", {
imageName: "myImage",
location: "West US",
resourceGroupName: "myResourceGroup",
storageProfile: {
dataDisks: [{
blobUri: "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd",
lun: 1,
}],
osDisk: {
blobUri: "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
osState: azure_native.compute.OperatingSystemStateTypes.Generalized,
osType: azure_native.compute.OperatingSystemTypes.Linux,
},
zoneResilient: false,
},
});
import pulumi
import pulumi_azure_native as azure_native
image = azure_native.compute.Image("image",
image_name="myImage",
location="West US",
resource_group_name="myResourceGroup",
storage_profile={
"data_disks": [{
"blob_uri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd",
"lun": 1,
}],
"os_disk": {
"blob_uri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
"os_state": azure_native.compute.OperatingSystemStateTypes.GENERALIZED,
"os_type": azure_native.compute.OperatingSystemTypes.LINUX,
},
"zone_resilient": False,
})
resources:
image:
type: azure-native:compute:Image
properties:
imageName: myImage
location: West US
resourceGroupName: myResourceGroup
storageProfile:
dataDisks:
- blobUri: https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd
lun: 1
osDisk:
blobUri: https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd
osState: Generalized
osType: Linux
zoneResilient: false
Create a virtual machine image that includes a data disk from a managed disk.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var image = new AzureNative.Compute.Image("image", new()
{
ImageName = "myImage",
Location = "West US",
ResourceGroupName = "myResourceGroup",
StorageProfile = new AzureNative.Compute.Inputs.ImageStorageProfileArgs
{
DataDisks = new[]
{
new AzureNative.Compute.Inputs.ImageDataDiskArgs
{
Lun = 1,
ManagedDisk = new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2",
},
},
},
OsDisk = new AzureNative.Compute.Inputs.ImageOSDiskArgs
{
ManagedDisk = new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk",
},
OsState = AzureNative.Compute.OperatingSystemStateTypes.Generalized,
OsType = AzureNative.Compute.OperatingSystemTypes.Linux,
},
ZoneResilient = false,
},
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewImage(ctx, "image", &compute.ImageArgs{
ImageName: pulumi.String("myImage"),
Location: pulumi.String("West US"),
ResourceGroupName: pulumi.String("myResourceGroup"),
StorageProfile: &compute.ImageStorageProfileArgs{
DataDisks: compute.ImageDataDiskArray{
&compute.ImageDataDiskArgs{
Lun: pulumi.Int(1),
ManagedDisk: &compute.SubResourceArgs{
Id: pulumi.String("subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2"),
},
},
},
OsDisk: &compute.ImageOSDiskArgs{
ManagedDisk: &compute.SubResourceArgs{
Id: pulumi.String("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk"),
},
OsState: compute.OperatingSystemStateTypesGeneralized,
OsType: compute.OperatingSystemTypesLinux,
},
ZoneResilient: pulumi.Bool(false),
},
})
if err != nil {
return err
}
return nil
})
}
terraform {
required_providers {
azure-native = {
source = "pulumi/azure-native"
}
}
}
resource "azure-native_compute_image" "image" {
lifecycle {
create_before_destroy = true
}
image_name = "myImage"
location = "West US"
resource_group_name = "myResourceGroup"
storage_profile = {
data_disks = [{
lun = 1
managed_disk = {
id = "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2"
}
}]
os_disk = {
managed_disk = {
id = "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk"
}
os_state = "Generalized"
os_type = "Linux"
}
zone_resilient = false
}
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.Image;
import com.pulumi.azurenative.compute.ImageArgs;
import com.pulumi.azurenative.compute.inputs.ImageStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageDataDiskArgs;
import com.pulumi.azurenative.compute.inputs.SubResourceArgs;
import com.pulumi.azurenative.compute.inputs.ImageOSDiskArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 image = new Image("image", ImageArgs.builder()
.imageName("myImage")
.location("West US")
.resourceGroupName("myResourceGroup")
.storageProfile(ImageStorageProfileArgs.builder()
.dataDisks(ImageDataDiskArgs.builder()
.lun(1)
.managedDisk(SubResourceArgs.builder()
.id("subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2")
.build())
.build())
.osDisk(ImageOSDiskArgs.builder()
.managedDisk(SubResourceArgs.builder()
.id("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk")
.build())
.osState("Generalized")
.osType("Linux")
.build())
.zoneResilient(false)
.build())
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const image = new azure_native.compute.Image("image", {
imageName: "myImage",
location: "West US",
resourceGroupName: "myResourceGroup",
storageProfile: {
dataDisks: [{
lun: 1,
managedDisk: {
id: "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2",
},
}],
osDisk: {
managedDisk: {
id: "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk",
},
osState: azure_native.compute.OperatingSystemStateTypes.Generalized,
osType: azure_native.compute.OperatingSystemTypes.Linux,
},
zoneResilient: false,
},
});
import pulumi
import pulumi_azure_native as azure_native
image = azure_native.compute.Image("image",
image_name="myImage",
location="West US",
resource_group_name="myResourceGroup",
storage_profile={
"data_disks": [{
"lun": 1,
"managed_disk": {
"id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2",
},
}],
"os_disk": {
"managed_disk": {
"id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk",
},
"os_state": azure_native.compute.OperatingSystemStateTypes.GENERALIZED,
"os_type": azure_native.compute.OperatingSystemTypes.LINUX,
},
"zone_resilient": False,
})
resources:
image:
type: azure-native:compute:Image
properties:
imageName: myImage
location: West US
resourceGroupName: myResourceGroup
storageProfile:
dataDisks:
- lun: 1
managedDisk:
id: subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2
osDisk:
managedDisk:
id: subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk
osState: Generalized
osType: Linux
zoneResilient: false
Create a virtual machine image that includes a data disk from a snapshot.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var image = new AzureNative.Compute.Image("image", new()
{
ImageName = "myImage",
Location = "West US",
ResourceGroupName = "myResourceGroup",
StorageProfile = new AzureNative.Compute.Inputs.ImageStorageProfileArgs
{
DataDisks = new[]
{
new AzureNative.Compute.Inputs.ImageDataDiskArgs
{
Lun = 1,
Snapshot = new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2",
},
},
},
OsDisk = new AzureNative.Compute.Inputs.ImageOSDiskArgs
{
OsState = AzureNative.Compute.OperatingSystemStateTypes.Generalized,
OsType = AzureNative.Compute.OperatingSystemTypes.Linux,
Snapshot = new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot",
},
},
ZoneResilient = true,
},
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewImage(ctx, "image", &compute.ImageArgs{
ImageName: pulumi.String("myImage"),
Location: pulumi.String("West US"),
ResourceGroupName: pulumi.String("myResourceGroup"),
StorageProfile: &compute.ImageStorageProfileArgs{
DataDisks: compute.ImageDataDiskArray{
&compute.ImageDataDiskArgs{
Lun: pulumi.Int(1),
Snapshot: &compute.SubResourceArgs{
Id: pulumi.String("subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2"),
},
},
},
OsDisk: &compute.ImageOSDiskArgs{
OsState: compute.OperatingSystemStateTypesGeneralized,
OsType: compute.OperatingSystemTypesLinux,
Snapshot: &compute.SubResourceArgs{
Id: pulumi.String("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"),
},
},
ZoneResilient: pulumi.Bool(true),
},
})
if err != nil {
return err
}
return nil
})
}
terraform {
required_providers {
azure-native = {
source = "pulumi/azure-native"
}
}
}
resource "azure-native_compute_image" "image" {
lifecycle {
create_before_destroy = true
}
image_name = "myImage"
location = "West US"
resource_group_name = "myResourceGroup"
storage_profile = {
data_disks = [{
lun = 1
snapshot = {
id = "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2"
}
}]
os_disk = {
os_state = "Generalized"
os_type = "Linux"
snapshot = {
id = "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"
}
}
zone_resilient = true
}
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.compute.Image;
import com.pulumi.azurenative.compute.ImageArgs;
import com.pulumi.azurenative.compute.inputs.ImageStorageProfileArgs;
import com.pulumi.azurenative.compute.inputs.ImageDataDiskArgs;
import com.pulumi.azurenative.compute.inputs.SubResourceArgs;
import com.pulumi.azurenative.compute.inputs.ImageOSDiskArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 image = new Image("image", ImageArgs.builder()
.imageName("myImage")
.location("West US")
.resourceGroupName("myResourceGroup")
.storageProfile(ImageStorageProfileArgs.builder()
.dataDisks(ImageDataDiskArgs.builder()
.lun(1)
.snapshot(SubResourceArgs.builder()
.id("subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2")
.build())
.build())
.osDisk(ImageOSDiskArgs.builder()
.osState("Generalized")
.osType("Linux")
.snapshot(SubResourceArgs.builder()
.id("subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot")
.build())
.build())
.zoneResilient(true)
.build())
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const image = new azure_native.compute.Image("image", {
imageName: "myImage",
location: "West US",
resourceGroupName: "myResourceGroup",
storageProfile: {
dataDisks: [{
lun: 1,
snapshot: {
id: "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2",
},
}],
osDisk: {
osState: azure_native.compute.OperatingSystemStateTypes.Generalized,
osType: azure_native.compute.OperatingSystemTypes.Linux,
snapshot: {
id: "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot",
},
},
zoneResilient: true,
},
});
import pulumi
import pulumi_azure_native as azure_native
image = azure_native.compute.Image("image",
image_name="myImage",
location="West US",
resource_group_name="myResourceGroup",
storage_profile={
"data_disks": [{
"lun": 1,
"snapshot": {
"id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2",
},
}],
"os_disk": {
"os_state": azure_native.compute.OperatingSystemStateTypes.GENERALIZED,
"os_type": azure_native.compute.OperatingSystemTypes.LINUX,
"snapshot": {
"id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot",
},
},
"zone_resilient": True,
})
resources:
image:
type: azure-native:compute:Image
properties:
imageName: myImage
location: West US
resourceGroupName: myResourceGroup
storageProfile:
dataDisks:
- lun: 1
snapshot:
id: subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2
osDisk:
osState: Generalized
osType: Linux
snapshot:
id: subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot
zoneResilient: true
Create Image Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
@overload
def Image(resource_name: str,
args: ImageArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Image(resource_name: str,
opts: Optional[ResourceOptions] = None,
resource_group_name: Optional[str] = None,
extended_location: Optional[ExtendedLocationArgs] = None,
hyper_v_generation: Optional[Union[str, HyperVGenerationTypes]] = None,
image_name: Optional[str] = None,
location: Optional[str] = None,
source_virtual_machine: Optional[SubResourceArgs] = None,
storage_profile: Optional[ImageStorageProfileArgs] = None,
tags: Optional[Mapping[str, str]] = None)
public Image(String name, ImageArgs args)
public Image(String name, ImageArgs args, CustomResourceOptions options)
type: azure-native:compute:Image
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "azure-native_compute_image" "name" {
# resource properties
}
Parameters
- name
string
- The unique name of the resource.
- args
ImageArgs
- The arguments to resource properties.
- opts
CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
str
- The unique name of the resource.
- args
ImageArgs
- The arguments to resource properties.
- opts
ResourceOptions
- Bag of options to control resource's behavior.
- ctx
Context
- Context object for the current deployment.
- name
string
- The unique name of the resource.
- args
ImageArgs
- The arguments to resource properties.
- opts
ResourceOption
- Bag of options to control resource's behavior.
- name
string
- The unique name of the resource.
- args
ImageArgs
- The arguments to resource properties.
- opts
CustomResourceOptions
- Bag of options to control resource's behavior.
- name
String
- The unique name of the resource.
- args
ImageArgs
- The arguments to resource properties.
- options
CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var azure_nativeImageResource = new AzureNative.Compute.Image("azure-nativeImageResource", new()
{
ResourceGroupName = "string",
ExtendedLocation = new AzureNative.Compute.Inputs.ExtendedLocationArgs
{
Name = "string",
Type = "string",
},
HyperVGeneration = "string",
ImageName = "string",
Location = "string",
SourceVirtualMachine = new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "string",
},
StorageProfile = new AzureNative.Compute.Inputs.ImageStorageProfileArgs
{
DataDisks = new[]
{
new AzureNative.Compute.Inputs.ImageDataDiskArgs
{
Lun = 0,
BlobUri = "string",
Caching = AzureNative.Compute.CachingTypes.None,
DiskEncryptionSet = new AzureNative.Compute.Inputs.DiskEncryptionSetParametersArgs
{
Id = "string",
},
DiskSizeGB = 0,
ManagedDisk = new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "string",
},
Snapshot = new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "string",
},
StorageAccountType = "string",
},
},
OsDisk = new AzureNative.Compute.Inputs.ImageOSDiskArgs
{
OsState = AzureNative.Compute.OperatingSystemStateTypes.Generalized,
OsType = AzureNative.Compute.OperatingSystemTypes.Windows,
BlobUri = "string",
Caching = AzureNative.Compute.CachingTypes.None,
DiskEncryptionSet = new AzureNative.Compute.Inputs.DiskEncryptionSetParametersArgs
{
Id = "string",
},
DiskSizeGB = 0,
ManagedDisk = new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "string",
},
Snapshot = new AzureNative.Compute.Inputs.SubResourceArgs
{
Id = "string",
},
StorageAccountType = "string",
},
ZoneResilient = false,
},
Tags =
{
{ "string", "string" },
},
});
example, err := compute.NewImage(ctx, "azure-nativeImageResource", &compute.ImageArgs{
ResourceGroupName: pulumi.String("string"),
ExtendedLocation: &compute.ExtendedLocationArgs{
Name: pulumi.String("string"),
Type: pulumi.String("string"),
},
HyperVGeneration: pulumi.String("string"),
ImageName: pulumi.String("string"),
Location: pulumi.String("string"),
SourceVirtualMachine: &compute.SubResourceArgs{
Id: pulumi.String("string"),
},
StorageProfile: &compute.ImageStorageProfileArgs{
DataDisks: compute.ImageDataDiskArray{
&compute.ImageDataDiskArgs{
Lun: pulumi.Int(0),
BlobUri: pulumi.String("string"),
Caching: compute.CachingTypesNone,
DiskEncryptionSet: &compute.DiskEncryptionSetParametersArgs{
Id: pulumi.String("string"),
},
DiskSizeGB: pulumi.Int(0),
ManagedDisk: &compute.SubResourceArgs{
Id: pulumi.String("string"),
},
Snapshot: &compute.SubResourceArgs{
Id: pulumi.String("string"),
},
StorageAccountType: pulumi.String("string"),
},
},
OsDisk: &compute.ImageOSDiskArgs{
OsState: compute.OperatingSystemStateTypesGeneralized,
OsType: compute.OperatingSystemTypesWindows,
BlobUri: pulumi.String("string"),
Caching: compute.CachingTypesNone,
DiskEncryptionSet: &compute.DiskEncryptionSetParametersArgs{
Id: pulumi.String("string"),
},
DiskSizeGB: pulumi.Int(0),
ManagedDisk: &compute.SubResourceArgs{
Id: pulumi.String("string"),
},
Snapshot: &compute.SubResourceArgs{
Id: pulumi.String("string"),
},
StorageAccountType: pulumi.String("string"),
},
ZoneResilient: pulumi.Bool(false),
},
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
resource "azure-native_compute_image" "azure-nativeImageResource" {
lifecycle {
create_before_destroy = true
}
resource_group_name = "string"
extended_location = {
name = "string"
type = "string"
}
hyper_v_generation = "string"
image_name = "string"
location = "string"
source_virtual_machine = {
id = "string"
}
storage_profile = {
data_disks = [{
lun = 0
blob_uri = "string"
caching = "None"
disk_encryption_set = {
id = "string"
}
disk_size_gb = 0
managed_disk = {
id = "string"
}
snapshot = {
id = "string"
}
storage_account_type = "string"
}]
os_disk = {
os_state = "Generalized"
os_type = "Windows"
blob_uri = "string"
caching = "None"
disk_encryption_set = {
id = "string"
}
disk_size_gb = 0
managed_disk = {
id = "string"
}
snapshot = {
id = "string"
}
storage_account_type = "string"
}
zone_resilient = false
}
tags = {
"string" = "string"
}
}
var azure_nativeImageResource = new com.pulumi.azurenative.compute.Image("azure-nativeImageResource", com.pulumi.azurenative.compute.ImageArgs.builder()
.resourceGroupName("string")
.extendedLocation(com.pulumi.azurenative.compute.inputs.ExtendedLocationArgs.builder()
.name("string")
.type("string")
.build())
.hyperVGeneration("string")
.imageName("string")
.location("string")
.sourceVirtualMachine(com.pulumi.azurenative.compute.inputs.SubResourceArgs.builder()
.id("string")
.build())
.storageProfile(ImageStorageProfileArgs.builder()
.dataDisks(ImageDataDiskArgs.builder()
.lun(0)
.blobUri("string")
.caching(com.pulumi.azurenative.compute.enums.CachingTypes.None)
.diskEncryptionSet(com.pulumi.azurenative.compute.inputs.DiskEncryptionSetParametersArgs.builder()
.id("string")
.build())
.diskSizeGB(0)
.managedDisk(com.pulumi.azurenative.compute.inputs.SubResourceArgs.builder()
.id("string")
.build())
.snapshot(com.pulumi.azurenative.compute.inputs.SubResourceArgs.builder()
.id("string")
.build())
.storageAccountType("string")
.build())
.osDisk(ImageOSDiskArgs.builder()
.osState(com.pulumi.azurenative.compute.enums.OperatingSystemStateTypes.Generalized)
.osType(com.pulumi.azurenative.compute.enums.OperatingSystemTypes.Windows)
.blobUri("string")
.caching(com.pulumi.azurenative.compute.enums.CachingTypes.None)
.diskEncryptionSet(com.pulumi.azurenative.compute.inputs.DiskEncryptionSetParametersArgs.builder()
.id("string")
.build())
.diskSizeGB(0)
.managedDisk(com.pulumi.azurenative.compute.inputs.SubResourceArgs.builder()
.id("string")
.build())
.snapshot(com.pulumi.azurenative.compute.inputs.SubResourceArgs.builder()
.id("string")
.build())
.storageAccountType("string")
.build())
.zoneResilient(false)
.build())
.tags(Map.of("string", "string"))
.build());
azure_native_image_resource = azure_native.compute.Image("azure-nativeImageResource",
resource_group_name="string",
extended_location={
"name": "string",
"type": "string",
},
hyper_v_generation="string",
image_name="string",
location="string",
source_virtual_machine={
"id": "string",
},
storage_profile={
"data_disks": [{
"lun": 0,
"blob_uri": "string",
"caching": azure_native.compute.CachingTypes.NONE,
"disk_encryption_set": {
"id": "string",
},
"disk_size_gb": 0,
"managed_disk": {
"id": "string",
},
"snapshot": {
"id": "string",
},
"storage_account_type": "string",
}],
"os_disk": {
"os_state": azure_native.compute.OperatingSystemStateTypes.GENERALIZED,
"os_type": azure_native.compute.OperatingSystemTypes.WINDOWS,
"blob_uri": "string",
"caching": azure_native.compute.CachingTypes.NONE,
"disk_encryption_set": {
"id": "string",
},
"disk_size_gb": 0,
"managed_disk": {
"id": "string",
},
"snapshot": {
"id": "string",
},
"storage_account_type": "string",
},
"zone_resilient": False,
},
tags={
"string": "string",
})
const azure_nativeImageResource = new azure_native.compute.Image("azure-nativeImageResource", {
resourceGroupName: "string",
extendedLocation: {
name: "string",
type: "string",
},
hyperVGeneration: "string",
imageName: "string",
location: "string",
sourceVirtualMachine: {
id: "string",
},
storageProfile: {
dataDisks: [{
lun: 0,
blobUri: "string",
caching: azure_native.compute.CachingTypes.None,
diskEncryptionSet: {
id: "string",
},
diskSizeGB: 0,
managedDisk: {
id: "string",
},
snapshot: {
id: "string",
},
storageAccountType: "string",
}],
osDisk: {
osState: azure_native.compute.OperatingSystemStateTypes.Generalized,
osType: azure_native.compute.OperatingSystemTypes.Windows,
blobUri: "string",
caching: azure_native.compute.CachingTypes.None,
diskEncryptionSet: {
id: "string",
},
diskSizeGB: 0,
managedDisk: {
id: "string",
},
snapshot: {
id: "string",
},
storageAccountType: "string",
},
zoneResilient: false,
},
tags: {
string: "string",
},
});
type: azure-native:compute:Image
properties:
extendedLocation:
name: string
type: string
hyperVGeneration: string
imageName: string
location: string
resourceGroupName: string
sourceVirtualMachine:
id: string
storageProfile:
dataDisks:
- blobUri: string
caching: None
diskEncryptionSet:
id: string
diskSizeGB: 0
lun: 0
managedDisk:
id: string
snapshot:
id: string
storageAccountType: string
osDisk:
blobUri: string
caching: None
diskEncryptionSet:
id: string
diskSizeGB: 0
managedDisk:
id: string
osState: Generalized
osType: Windows
snapshot:
id: string
storageAccountType: string
zoneResilient: false
tags:
string: string
Image Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Image resource accepts the following input properties:
- resource_group_name
string
- The name of the resource group. The name is case insensitive.
- extended_location
object
- The extended location of the Image.
- hyper_v_generation
string | "V1" | "V2"
- Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource.
- image_name
string
- The name of the image.
- location
string
- The geo-location where the resource lives
- source_virtual_machine
object
- The source virtual machine from which Image is created.
- storage_profile
object
- Specifies the storage settings for the virtual machine disks.
- tags
map(string)
- Resource tags.
- resourceGroupName
String
- The name of the resource group. The name is case insensitive.
- extendedLocation
ExtendedLocation
- The extended location of the Image.
- hyperVGeneration
String | HyperVGenerationTypes
- Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource.
- imageName
String
- The name of the image.
- location
String
- The geo-location where the resource lives
- sourceVirtualMachine
SubResource
- The source virtual machine from which Image is created.
- storageProfile
ImageStorageProfile
- Specifies the storage settings for the virtual machine disks.
- tags
Map<String,String>
- Resource tags.
- resourceGroupName
string
- The name of the resource group. The name is case insensitive.
- extendedLocation
ExtendedLocation
- The extended location of the Image.
- hyperVGeneration
string | HyperVGenerationTypes
- Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource.
- imageName
string
- The name of the image.
- location
string
- The geo-location where the resource lives
- sourceVirtualMachine
SubResource
- The source virtual machine from which Image is created.
- storageProfile
ImageStorageProfile
- Specifies the storage settings for the virtual machine disks.
- tags
{[key: string]: string}
- Resource tags.
- resourceGroupName
String
- The name of the resource group. The name is case insensitive.
- extendedLocation
Property Map
- The extended location of the Image.
- hyperVGeneration
String | "V1" | "V2"
- Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource.
- imageName
String
- The name of the image.
- location
String
- The geo-location where the resource lives
- sourceVirtualMachine
Property Map
- The source virtual machine from which Image is created.
- storageProfile
Property Map
- Specifies the storage settings for the virtual machine disks.
- tags
Map<String>
- Resource tags.
Outputs
All input properties are implicitly available as output properties. Additionally, the Image resource produces the following output properties:
- AzureApiVersion
string
- The Azure API version of the resource.
- Id
string
- The provider-assigned unique ID for this managed resource.
- Name
string
- The name of the resource
- ProvisioningState
string
- The provisioning state.
- SystemData
SystemDataResponse
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- Type
string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azure_api_version
string
- The Azure API version of the resource.
- id
string
- The provider-assigned unique ID for this managed resource.
- name
string
- The name of the resource
- provisioning_state
string
- The provisioning state.
- system_data
object
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type
string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azureApiVersion
String
- The Azure API version of the resource.
- id
String
- The provider-assigned unique ID for this managed resource.
- name
String
- The name of the resource
- provisioningState
String
- The provisioning state.
- systemData
SystemDataResponse
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type
String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azureApiVersion
string
- The Azure API version of the resource.
- id
string
- The provider-assigned unique ID for this managed resource.
- name
string
- The name of the resource
- provisioningState
string
- The provisioning state.
- systemData
SystemDataResponse
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type
string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azure_api_version
str
- The Azure API version of the resource.
- id
str
- The provider-assigned unique ID for this managed resource.
- name
str
- The name of the resource
- provisioning_state
str
- The provisioning state.
- system_data
SystemDataResponse
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type
str
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azureApiVersion
String
- The Azure API version of the resource.
- id
String
- The provider-assigned unique ID for this managed resource.
- name
String
- The name of the resource
- provisioningState
String
- The provisioning state.
- systemData
Property Map
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type
String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Look up Existing Image Resource
Get an existing Image resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static Image get(String name, Output<String> id, CustomResourceOptions options)
resources: existingImage: type: azure-native:compute:Image get: id: ${id}
import {
to = azure-native_compute_image.example
id = "${id}"
}
- name
string
- The unique name of the resulting resource.
- id
Input<ID>
- The unique provider ID of the resource to look up.
- opts
CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
str
- The unique name of the resulting resource.
- id
str
- The unique provider ID of the resource to look up.
- opts
ResourceOptions
- Bag of options to control resource's behavior.
- ctx
Context
- Context object for the current deployment.
- name
string
- The unique name of the resulting resource.
- id
IDInput
- The unique provider ID of the resource to look up.
- state
ImageState
- Pass nil. This resource has no state arguments.
- opts
ResourceOption
- Bag of options to control resource's behavior.
- name
string
- The unique name of the resulting resource.
- id
Input<string>
- The unique provider ID of the resource to look up.
- opts
CustomResourceOptions
- Bag of options to control resource's behavior.
- name
String
- The unique name of the resulting resource.
- id
Output<String>
- The unique provider ID of the resource to look up.
- options
CustomResourceOptions
- Bag of options to control resource's behavior.
Supporting Types
CachingTypes
Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The defaulting behavior is: None for Standard storage. ReadOnly for Premium storage.
| Name | Value |
|---|
| None | None |
| ReadOnly | ReadOnly |
| ReadWrite | ReadWrite |
| Name | Value |
|---|
| CachingTypesNone | None |
| CachingTypesReadOnly | ReadOnly |
| CachingTypesReadWrite | ReadWrite |
| Value |
|---|
None |
ReadOnly |
ReadWrite |
| Name | Value |
|---|
| None | None |
| ReadOnly | ReadOnly |
| ReadWrite | ReadWrite |
| Name | Value |
|---|
| None | None |
| ReadOnly | ReadOnly |
| ReadWrite | ReadWrite |
| Name | Value |
|---|
| NONE | None |
| READ_ONLY | ReadOnly |
| READ_WRITE | ReadWrite |
| Value |
|---|
None |
ReadOnly |
ReadWrite |
DiskEncryptionSetParameters, DiskEncryptionSetParametersArgs
Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. Note: The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details.
DiskEncryptionSetParametersResponse
Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. Note: The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details.
ExtendedLocation, ExtendedLocationArgs
The complex type of the extended location.
- name
string
- The name of the extended location.
- type
string | "EdgeZone"
- The type of the extended location.
- name
String
- The name of the extended location.
- type
String | "EdgeZone"
- The type of the extended location.
ExtendedLocationResponse
The complex type of the extended location.
- Name
string
- The name of the extended location.
- Type
string
- The type of the extended location.
- Name
string
- The name of the extended location.
- Type
string
- The type of the extended location.
- name
string
- The name of the extended location.
- type
string
- The type of the extended location.
- name
String
- The name of the extended location.
- type
String
- The type of the extended location.
- name
string
- The name of the extended location.
- type
string
- The type of the extended location.
- name
str
- The name of the extended location.
- type
str
- The type of the extended location.
- name
String
- The name of the extended location.
- type
String
- The type of the extended location.
ExtendedLocationTypes
The type of the extended location.
| Name | Value |
|---|
| EdgeZone | EdgeZone |
| Name | Value |
|---|
| ExtendedLocationTypesEdgeZone | EdgeZone |
| Name | Value |
|---|
| EdgeZone | EdgeZone |
| Name | Value |
|---|
| EdgeZone | EdgeZone |
| Name | Value |
|---|
| EDGE_ZONE | EdgeZone |
HyperVGenerationTypes
Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource.
| Name | Value |
|---|
| HyperVGenerationTypesV1 | V1 |
| HyperVGenerationTypesV2 | V2 |
ImageDataDisk, ImageDataDiskArgs
Describes a data disk.
- Lun
int
- Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
- BlobUri
string
- The Virtual Hard Disk.
- Caching
CachingTypes
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- DiskEncryptionSet
DiskEncryptionSetParameters
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- DiskSizeGB
int
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- ManagedDisk
SubResource
- The managedDisk.
- Snapshot
SubResource
- The snapshot.
- StorageAccountType
string | StorageAccountTypes
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
- lun
Integer
- Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
- blobUri
String
- The Virtual Hard Disk.
- caching
CachingTypes
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- diskEncryptionSet
DiskEncryptionSetParameters
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- diskSizeGB
Integer
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- managedDisk
SubResource
- The managedDisk.
- snapshot
SubResource
- The snapshot.
- storageAccountType
String | StorageAccountTypes
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
- lun
number
- Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
- blobUri
string
- The Virtual Hard Disk.
- caching
CachingTypes
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- diskEncryptionSet
DiskEncryptionSetParameters
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- diskSizeGB
number
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- managedDisk
SubResource
- The managedDisk.
- snapshot
SubResource
- The snapshot.
- storageAccountType
string | StorageAccountTypes
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
- lun
int
- Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
- blob_uri
str
- The Virtual Hard Disk.
- caching
CachingTypes
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- disk_encryption_set
DiskEncryptionSetParameters
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- disk_size_gb
int
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- managed_disk
SubResource
- The managedDisk.
- snapshot
SubResource
- The snapshot.
- storage_account_type
str | StorageAccountTypes
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
ImageDataDiskResponse
Describes a data disk.
- Lun
int
- Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
- BlobUri
string
- The Virtual Hard Disk.
- Caching
string
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- DiskEncryptionSet
DiskEncryptionSetParametersResponse
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- DiskSizeGB
int
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- ManagedDisk
SubResourceResponse
- The managedDisk.
- Snapshot
SubResourceResponse
- The snapshot.
- StorageAccountType
string
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
- lun
number
- Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
- blob_uri
string
- The Virtual Hard Disk.
- caching
string
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- disk_encryption_set
object
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- disk_size_gb
number
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- managed_disk
object
- The managedDisk.
- snapshot
object
- The snapshot.
- storage_account_type
string
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
- lun
Integer
- Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
- blobUri
String
- The Virtual Hard Disk.
- caching
String
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- diskEncryptionSet
DiskEncryptionSetParametersResponse
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- diskSizeGB
Integer
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- managedDisk
SubResourceResponse
- The managedDisk.
- snapshot
SubResourceResponse
- The snapshot.
- storageAccountType
String
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
- lun
number
- Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
- blobUri
string
- The Virtual Hard Disk.
- caching
string
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- diskEncryptionSet
DiskEncryptionSetParametersResponse
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- diskSizeGB
number
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- managedDisk
SubResourceResponse
- The managedDisk.
- snapshot
SubResourceResponse
- The snapshot.
- storageAccountType
string
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
- lun
int
- Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
- blob_uri
str
- The Virtual Hard Disk.
- caching
str
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- disk_encryption_set
DiskEncryptionSetParametersResponse
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- disk_size_gb
int
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- managed_disk
SubResourceResponse
- The managedDisk.
- snapshot
SubResourceResponse
- The snapshot.
- storage_account_type
str
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
- lun
Number
- Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
- blobUri
String
- The Virtual Hard Disk.
- caching
String
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- diskEncryptionSet
Property Map
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- diskSizeGB
Number
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- managedDisk
Property Map
- The managedDisk.
- snapshot
Property Map
- The snapshot.
- storageAccountType
String
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
ImageOSDisk, ImageOSDiskArgs
Describes an Operating System disk.
- osState
OperatingSystemStateTypes
- The OS State. For managed images, use Generalized.
- osType
OperatingSystemTypes
- This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: Windows, Linux.
- blobUri
String
- The Virtual Hard Disk.
- caching
CachingTypes
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- diskEncryptionSet
DiskEncryptionSetParameters
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- diskSizeGB
Integer
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- managedDisk
SubResource
- The managedDisk.
- snapshot
SubResource
- The snapshot.
- storageAccountType
String | StorageAccountTypes
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
- osState
OperatingSystemStateTypes
- The OS State. For managed images, use Generalized.
- osType
OperatingSystemTypes
- This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: Windows, Linux.
- blobUri
string
- The Virtual Hard Disk.
- caching
CachingTypes
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- diskEncryptionSet
DiskEncryptionSetParameters
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- diskSizeGB
number
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- managedDisk
SubResource
- The managedDisk.
- snapshot
SubResource
- The snapshot.
- storageAccountType
string | StorageAccountTypes
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
ImageOSDiskResponse
Describes an Operating System disk.
- OsState
string
- The OS State. For managed images, use Generalized.
- OsType
string
- This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: Windows, Linux.
- BlobUri
string
- The Virtual Hard Disk.
- Caching
string
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- DiskEncryptionSet
DiskEncryptionSetParametersResponse
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- DiskSizeGB
int
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- ManagedDisk
SubResourceResponse
- The managedDisk.
- Snapshot
SubResourceResponse
- The snapshot.
- StorageAccountType
string
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
- os_state
string
- The OS State. For managed images, use Generalized.
- os_type
string
- This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: Windows, Linux.
- blob_uri
string
- The Virtual Hard Disk.
- caching
string
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- disk_encryption_set
object
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- disk_size_gb
number
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- managed_disk
object
- The managedDisk.
- snapshot
object
- The snapshot.
- storage_account_type
string
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
- osState
String
- The OS State. For managed images, use Generalized.
- osType
String
- This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: Windows, Linux.
- blobUri
String
- The Virtual Hard Disk.
- caching
String
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- diskEncryptionSet
DiskEncryptionSetParametersResponse
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- diskSizeGB
Integer
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- managedDisk
SubResourceResponse
- The managedDisk.
- snapshot
SubResourceResponse
- The snapshot.
- storageAccountType
String
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
- osState
string
- The OS State. For managed images, use Generalized.
- osType
string
- This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: Windows, Linux.
- blobUri
string
- The Virtual Hard Disk.
- caching
string
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- diskEncryptionSet
DiskEncryptionSetParametersResponse
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- diskSizeGB
number
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- managedDisk
SubResourceResponse
- The managedDisk.
- snapshot
SubResourceResponse
- The snapshot.
- storageAccountType
string
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
- os_state
str
- The OS State. For managed images, use Generalized.
- os_type
str
- This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: Windows, Linux.
- blob_uri
str
- The Virtual Hard Disk.
- caching
str
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- disk_encryption_set
DiskEncryptionSetParametersResponse
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- disk_size_gb
int
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- managed_disk
SubResourceResponse
- The managedDisk.
- snapshot
SubResourceResponse
- The snapshot.
- storage_account_type
str
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
- osState
String
- The OS State. For managed images, use Generalized.
- osType
String
- This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: Windows, Linux.
- blobUri
String
- The Virtual Hard Disk.
- caching
String
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- diskEncryptionSet
Property Map
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- diskSizeGB
Number
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- managedDisk
Property Map
- The managedDisk.
- snapshot
Property Map
- The snapshot.
- storageAccountType
String
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
ImageStorageProfile, ImageStorageProfileArgs
Describes a storage profile.
ImageStorageProfileResponse
Describes a storage profile.
OperatingSystemStateTypes
The OS State. For managed images, use Generalized.
| Name | Value | Description |
|---|
| Generalized | Generalized | Generalized image. Needs to be provisioned during deployment time. |
| Specialized | Specialized | Specialized image. Contains already provisioned OS Disk. |
| Name | Value | Description |
|---|
| OperatingSystemStateTypesGeneralized | Generalized | Generalized image. Needs to be provisioned during deployment time. |
| OperatingSystemStateTypesSpecialized | Specialized | Specialized image. Contains already provisioned OS Disk. |
| Value | Description |
|---|
Generalized | Generalized image. Needs to be provisioned during deployment time. |
Specialized | Specialized image. Contains already provisioned OS Disk. |
| Name | Value | Description |
|---|
| Generalized | Generalized | Generalized image. Needs to be provisioned during deployment time. |
| Specialized | Specialized | Specialized image. Contains already provisioned OS Disk. |
| Name | Value | Description |
|---|
| Generalized | Generalized | Generalized image. Needs to be provisioned during deployment time. |
| Specialized | Specialized | Specialized image. Contains already provisioned OS Disk. |
| Name | Value | Description |
|---|
| GENERALIZED | Generalized | Generalized image. Needs to be provisioned during deployment time. |
| SPECIALIZED | Specialized | Specialized image. Contains already provisioned OS Disk. |
| Value | Description |
|---|
Generalized | Generalized image. Needs to be provisioned during deployment time. |
Specialized | Specialized image. Contains already provisioned OS Disk. |
OperatingSystemTypes
This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: Windows, Linux.
| Name | Value |
|---|
| Windows | Windows |
| Linux | Linux |
| Name | Value |
|---|
| OperatingSystemTypesWindows | Windows |
| OperatingSystemTypesLinux | Linux |
| Name | Value |
|---|
| Windows | Windows |
| Linux | Linux |
| Name | Value |
|---|
| Windows | Windows |
| Linux | Linux |
| Name | Value |
|---|
| WINDOWS | Windows |
| LINUX | Linux |
StorageAccountTypes
Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
| Name | Value |
|---|
| Standard_LRS | Standard_LRS |
| Premium_LRS | Premium_LRS |
| StandardSSD_LRS | StandardSSD_LRS |
| UltraSSD_LRS | UltraSSD_LRS |
| Premium_ZRS | Premium_ZRS |
| StandardSSD_ZRS | StandardSSD_ZRS |
| PremiumV2_LRS | PremiumV2_LRS |
| Name | Value |
|---|
| StorageAccountTypes_Standard_LRS | Standard_LRS |
| StorageAccountTypes_Premium_LRS | Premium_LRS |
| StorageAccountTypes_StandardSSD_LRS | StandardSSD_LRS |
| StorageAccountTypes_UltraSSD_LRS | UltraSSD_LRS |
| StorageAccountTypes_Premium_ZRS | Premium_ZRS |
| StorageAccountTypes_StandardSSD_ZRS | StandardSSD_ZRS |
| StorageAccountTypes_PremiumV2_LRS | PremiumV2_LRS |
| Value |
|---|
Standard_LRS |
Premium_LRS |
StandardSSD_LRS |
UltraSSD_LRS |
Premium_ZRS |
StandardSSD_ZRS |
PremiumV2_LRS |
| Name | Value |
|---|
| Standard_LRS | Standard_LRS |
| Premium_LRS | Premium_LRS |
| StandardSSD_LRS | StandardSSD_LRS |
| UltraSSD_LRS | UltraSSD_LRS |
| Premium_ZRS | Premium_ZRS |
| StandardSSD_ZRS | StandardSSD_ZRS |
| PremiumV2_LRS | PremiumV2_LRS |
| Name | Value |
|---|
| Standard_LRS | Standard_LRS |
| Premium_LRS | Premium_LRS |
| StandardSSD_LRS | StandardSSD_LRS |
| UltraSSD_LRS | UltraSSD_LRS |
| Premium_ZRS | Premium_ZRS |
| StandardSSD_ZRS | StandardSSD_ZRS |
| PremiumV2_LRS | PremiumV2_LRS |
| Name | Value |
|---|
| STANDARD_LRS | Standard_LRS |
| PREMIUM_LRS | Premium_LRS |
| STANDARD_SS_D_LRS | StandardSSD_LRS |
| ULTRA_SS_D_LRS | UltraSSD_LRS |
| PREMIUM_ZRS | Premium_ZRS |
| STANDARD_SS_D_ZRS | StandardSSD_ZRS |
| PREMIUM_V2_LRS | PremiumV2_LRS |
| Value |
|---|
Standard_LRS |
Premium_LRS |
StandardSSD_LRS |
UltraSSD_LRS |
Premium_ZRS |
StandardSSD_ZRS |
PremiumV2_LRS |
SubResource, SubResourceArgs
- Id
string
- Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted.
An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end.
A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself.
Example of a relative ID: $self/frontEndConfigurations/my-frontend.
- Id
string
- Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted.
An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end.
A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself.
Example of a relative ID: $self/frontEndConfigurations/my-frontend.
- id
string
- Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted.
An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end.
A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself.
Example of a relative ID: $self/frontEndConfigurations/my-frontend.
- id
String
- Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted.
An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end.
A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself.
Example of a relative ID: $self/frontEndConfigurations/my-frontend.
- id
string
- Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted.
An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end.
A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself.
Example of a relative ID: $self/frontEndConfigurations/my-frontend.
- id
str
- Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted.
An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end.
A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself.
Example of a relative ID: $self/frontEndConfigurations/my-frontend.
- id
String
- Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted.
An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end.
A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself.
Example of a relative ID: $self/frontEndConfigurations/my-frontend.
SubResourceResponse
SystemDataResponse
Metadata pertaining to creation and last modification of the resource.
- CreatedAt
string
- The timestamp of resource creation (UTC).
- CreatedBy
string
- The identity that created the resource.
- CreatedByType
string
- The type of identity that created the resource.
- LastModifiedAt
string
- The timestamp of resource last modification (UTC)
- LastModifiedBy
string
- The identity that last modified the resource.
- LastModifiedByType
string
- The type of identity that last modified the resource.
- CreatedAt
string
- The timestamp of resource creation (UTC).
- CreatedBy
string
- The identity that created the resource.
- CreatedByType
string
- The type of identity that created the resource.
- LastModifiedAt
string
- The timestamp of resource last modification (UTC)
- LastModifiedBy
string
- The identity that last modified the resource.
- LastModifiedByType
string
- The type of identity that last modified the resource.
- createdAt
String
- The timestamp of resource creation (UTC).
- createdBy
String
- The identity that created the resource.
- createdByType
String
- The type of identity that created the resource.
- lastModifiedAt
String
- The timestamp of resource last modification (UTC)
- lastModifiedBy
String
- The identity that last modified the resource.
- lastModifiedByType
String
- The type of identity that last modified the resource.
- createdAt
string
- The timestamp of resource creation (UTC).
- createdBy
string
- The identity that created the resource.
- createdByType
string
- The type of identity that created the resource.
- lastModifiedAt
string
- The timestamp of resource last modification (UTC)
- lastModifiedBy
string
- The identity that last modified the resource.
- lastModifiedByType
string
- The type of identity that last modified the resource.
- createdAt
String
- The timestamp of resource creation (UTC).
- createdBy
String
- The identity that created the resource.
- createdByType
String
- The type of identity that created the resource.
- lastModifiedAt
String
- The timestamp of resource last modification (UTC)
- lastModifiedBy
String
- The identity that last modified the resource.
- lastModifiedByType
String
- The type of identity that last modified the resource.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:compute:Image myImage /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0