We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
Manages a custom virtual machine image that can be used to create virtual machines.
Example Usage
Creating From VHD
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var exampleImage = new Azure.Compute.Image("exampleImage", new Azure.Compute.ImageArgs
{
Location = "West US",
ResourceGroupName = exampleResourceGroup.Name,
OsDisk = new Azure.Compute.Inputs.ImageOsDiskArgs
{
OsType = "Linux",
OsState = "Generalized",
BlobUri = "{blob_uri}",
SizeGb = 30,
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/compute"
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
_, err = compute.NewImage(ctx, "exampleImage", &compute.ImageArgs{
Location: pulumi.String("West US"),
ResourceGroupName: exampleResourceGroup.Name,
OsDisk: &compute.ImageOsDiskArgs{
OsType: pulumi.String("Linux"),
OsState: pulumi.String("Generalized"),
BlobUri: pulumi.String("{blob_uri}"),
SizeGb: pulumi.Int(30),
},
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleImage = new azure.compute.Image("exampleImage", {
location: "West US",
resourceGroupName: exampleResourceGroup.name,
osDisk: {
osType: "Linux",
osState: "Generalized",
blobUri: "{blob_uri}",
sizeGb: 30,
},
});
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_image = azure.compute.Image("exampleImage",
location="West US",
resource_group_name=example_resource_group.name,
os_disk=azure.compute.ImageOsDiskArgs(
os_type="Linux",
os_state="Generalized",
blob_uri="{blob_uri}",
size_gb=30,
))
Example coming soon!
Creating From Virtual Machine (VM Must Be Generalized Beforehand)
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var exampleImage = new Azure.Compute.Image("exampleImage", new Azure.Compute.ImageArgs
{
Location = "West US",
ResourceGroupName = exampleResourceGroup.Name,
SourceVirtualMachineId = "{vm_id}",
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/compute"
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
_, err = compute.NewImage(ctx, "exampleImage", &compute.ImageArgs{
Location: pulumi.String("West US"),
ResourceGroupName: exampleResourceGroup.Name,
SourceVirtualMachineId: pulumi.String("{vm_id}"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleImage = new azure.compute.Image("exampleImage", {
location: "West US",
resourceGroupName: exampleResourceGroup.name,
sourceVirtualMachineId: "{vm_id}",
});
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_image = azure.compute.Image("exampleImage",
location="West US",
resource_group_name=example_resource_group.name,
source_virtual_machine_id="{vm_id}")
Example coming soon!
Create Image Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Image(name: string, args: ImageArgs, opts?: CustomResourceOptions);@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,
data_disks: Optional[Sequence[ImageDataDiskArgs]] = None,
hyper_v_generation: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
os_disk: Optional[ImageOsDiskArgs] = None,
source_virtual_machine_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
zone_resilient: Optional[bool] = None)func NewImage(ctx *Context, name string, args ImageArgs, opts ...ResourceOption) (*Image, error)public Image(string name, ImageArgs args, CustomResourceOptions? opts = null)type: azure:compute:Image
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
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 imageResource = new Azure.Compute.Image("imageResource", new()
{
ResourceGroupName = "string",
DataDisks = new[]
{
new Azure.Compute.Inputs.ImageDataDiskArgs
{
BlobUri = "string",
Caching = "string",
Lun = 0,
ManagedDiskId = "string",
SizeGb = 0,
},
},
HyperVGeneration = "string",
Location = "string",
Name = "string",
OsDisk = new Azure.Compute.Inputs.ImageOsDiskArgs
{
BlobUri = "string",
Caching = "string",
ManagedDiskId = "string",
OsState = "string",
OsType = "string",
SizeGb = 0,
},
SourceVirtualMachineId = "string",
Tags =
{
{ "string", "string" },
},
ZoneResilient = false,
});
example, err := compute.NewImage(ctx, "imageResource", &compute.ImageArgs{
ResourceGroupName: pulumi.String("string"),
DataDisks: compute.ImageDataDiskArray{
&compute.ImageDataDiskArgs{
BlobUri: pulumi.String("string"),
Caching: pulumi.String("string"),
Lun: pulumi.Int(0),
ManagedDiskId: pulumi.String("string"),
SizeGb: pulumi.Int(0),
},
},
HyperVGeneration: pulumi.String("string"),
Location: pulumi.String("string"),
Name: pulumi.String("string"),
OsDisk: &compute.ImageOsDiskArgs{
BlobUri: pulumi.String("string"),
Caching: pulumi.String("string"),
ManagedDiskId: pulumi.String("string"),
OsState: pulumi.String("string"),
OsType: pulumi.String("string"),
SizeGb: pulumi.Int(0),
},
SourceVirtualMachineId: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
ZoneResilient: pulumi.Bool(false),
})
var imageResource = new Image("imageResource", ImageArgs.builder()
.resourceGroupName("string")
.dataDisks(ImageDataDiskArgs.builder()
.blobUri("string")
.caching("string")
.lun(0)
.managedDiskId("string")
.sizeGb(0)
.build())
.hyperVGeneration("string")
.location("string")
.name("string")
.osDisk(ImageOsDiskArgs.builder()
.blobUri("string")
.caching("string")
.managedDiskId("string")
.osState("string")
.osType("string")
.sizeGb(0)
.build())
.sourceVirtualMachineId("string")
.tags(Map.of("string", "string"))
.zoneResilient(false)
.build());
image_resource = azure.compute.Image("imageResource",
resource_group_name="string",
data_disks=[{
"blob_uri": "string",
"caching": "string",
"lun": 0,
"managed_disk_id": "string",
"size_gb": 0,
}],
hyper_v_generation="string",
location="string",
name="string",
os_disk={
"blob_uri": "string",
"caching": "string",
"managed_disk_id": "string",
"os_state": "string",
"os_type": "string",
"size_gb": 0,
},
source_virtual_machine_id="string",
tags={
"string": "string",
},
zone_resilient=False)
const imageResource = new azure.compute.Image("imageResource", {
resourceGroupName: "string",
dataDisks: [{
blobUri: "string",
caching: "string",
lun: 0,
managedDiskId: "string",
sizeGb: 0,
}],
hyperVGeneration: "string",
location: "string",
name: "string",
osDisk: {
blobUri: "string",
caching: "string",
managedDiskId: "string",
osState: "string",
osType: "string",
sizeGb: 0,
},
sourceVirtualMachineId: "string",
tags: {
string: "string",
},
zoneResilient: false,
});
type: azure:compute:Image
properties:
dataDisks:
- blobUri: string
caching: string
lun: 0
managedDiskId: string
sizeGb: 0
hyperVGeneration: string
location: string
name: string
osDisk:
blobUri: string
caching: string
managedDiskId: string
osState: string
osType: string
sizeGb: 0
resourceGroupName: string
sourceVirtualMachineId: string
tags:
string: string
zoneResilient: false
Image Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
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 stringName - The name of the resource group in which to create the image. Changing this forces a new resource to be created.
- Data
Disks List<ImageData Disk> - One or more
data_diskelements as defined below. - Hyper
VGeneration string - The HyperVGenerationType of the VirtualMachine created from the image as
V1,V2. The default isV1. - Location string
- Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
- Specifies the name of the image. Changing this forces a new resource to be created.
- Os
Disk ImageOs Disk - One or more
os_diskelements as defined below. - Source
Virtual stringMachine Id - The Virtual Machine ID from which to create the image.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Zone
Resilient bool - Is zone resiliency enabled? Defaults to
false. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which to create the image. Changing this forces a new resource to be created.
- Data
Disks []ImageData Disk Args - One or more
data_diskelements as defined below. - Hyper
VGeneration string - The HyperVGenerationType of the VirtualMachine created from the image as
V1,V2. The default isV1. - Location string
- Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
- Specifies the name of the image. Changing this forces a new resource to be created.
- Os
Disk ImageOs Disk Args - One or more
os_diskelements as defined below. - Source
Virtual stringMachine Id - The Virtual Machine ID from which to create the image.
- map[string]string
- A mapping of tags to assign to the resource.
- Zone
Resilient bool - Is zone resiliency enabled? Defaults to
false. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which to create the image. Changing this forces a new resource to be created.
- data
Disks List<ImageData Disk> - One or more
data_diskelements as defined below. - hyper
VGeneration String - The HyperVGenerationType of the VirtualMachine created from the image as
V1,V2. The default isV1. - location String
- Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name String
- Specifies the name of the image. Changing this forces a new resource to be created.
- os
Disk ImageOs Disk - One or more
os_diskelements as defined below. - source
Virtual StringMachine Id - The Virtual Machine ID from which to create the image.
- Map<String,String>
- A mapping of tags to assign to the resource.
- zone
Resilient Boolean - Is zone resiliency enabled? Defaults to
false. Changing this forces a new resource to be created.
- resource
Group stringName - The name of the resource group in which to create the image. Changing this forces a new resource to be created.
- data
Disks ImageData Disk[] - One or more
data_diskelements as defined below. - hyper
VGeneration string - The HyperVGenerationType of the VirtualMachine created from the image as
V1,V2. The default isV1. - location string
- Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name string
- Specifies the name of the image. Changing this forces a new resource to be created.
- os
Disk ImageOs Disk - One or more
os_diskelements as defined below. - source
Virtual stringMachine Id - The Virtual Machine ID from which to create the image.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- zone
Resilient boolean - Is zone resiliency enabled? Defaults to
false. Changing this forces a new resource to be created.
- resource_
group_ strname - The name of the resource group in which to create the image. Changing this forces a new resource to be created.
- data_
disks Sequence[ImageData Disk Args] - One or more
data_diskelements as defined below. - hyper_
v_ strgeneration - The HyperVGenerationType of the VirtualMachine created from the image as
V1,V2. The default isV1. - location str
- Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name str
- Specifies the name of the image. Changing this forces a new resource to be created.
- os_
disk ImageOs Disk Args - One or more
os_diskelements as defined below. - source_
virtual_ strmachine_ id - The Virtual Machine ID from which to create the image.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- zone_
resilient bool - Is zone resiliency enabled? Defaults to
false. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which to create the image. Changing this forces a new resource to be created.
- data
Disks List<Property Map> - One or more
data_diskelements as defined below. - hyper
VGeneration String - The HyperVGenerationType of the VirtualMachine created from the image as
V1,V2. The default isV1. - location String
- Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name String
- Specifies the name of the image. Changing this forces a new resource to be created.
- os
Disk Property Map - One or more
os_diskelements as defined below. - source
Virtual StringMachine Id - The Virtual Machine ID from which to create the image.
- Map<String>
- A mapping of tags to assign to the resource.
- zone
Resilient Boolean - Is zone resiliency enabled? Defaults to
false. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the Image resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
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 get(name: string, id: Input<ID>, state?: ImageState, opts?: CustomResourceOptions): Image@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
data_disks: Optional[Sequence[ImageDataDiskArgs]] = None,
hyper_v_generation: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
os_disk: Optional[ImageOsDiskArgs] = None,
resource_group_name: Optional[str] = None,
source_virtual_machine_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
zone_resilient: Optional[bool] = None) -> Imagefunc GetImage(ctx *Context, name string, id IDInput, state *ImageState, opts ...ResourceOption) (*Image, error)public static Image Get(string name, Input<string> id, ImageState? state, CustomResourceOptions? opts = null)public static Image get(String name, Output<String> id, ImageState state, CustomResourceOptions options)resources: _: type: azure:compute:Image get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Data
Disks List<ImageData Disk> - One or more
data_diskelements as defined below. - Hyper
VGeneration string - The HyperVGenerationType of the VirtualMachine created from the image as
V1,V2. The default isV1. - Location string
- Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
- Specifies the name of the image. Changing this forces a new resource to be created.
- Os
Disk ImageOs Disk - One or more
os_diskelements as defined below. - Resource
Group stringName - The name of the resource group in which to create the image. Changing this forces a new resource to be created.
- Source
Virtual stringMachine Id - The Virtual Machine ID from which to create the image.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Zone
Resilient bool - Is zone resiliency enabled? Defaults to
false. Changing this forces a new resource to be created.
- Data
Disks []ImageData Disk Args - One or more
data_diskelements as defined below. - Hyper
VGeneration string - The HyperVGenerationType of the VirtualMachine created from the image as
V1,V2. The default isV1. - Location string
- Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
- Specifies the name of the image. Changing this forces a new resource to be created.
- Os
Disk ImageOs Disk Args - One or more
os_diskelements as defined below. - Resource
Group stringName - The name of the resource group in which to create the image. Changing this forces a new resource to be created.
- Source
Virtual stringMachine Id - The Virtual Machine ID from which to create the image.
- map[string]string
- A mapping of tags to assign to the resource.
- Zone
Resilient bool - Is zone resiliency enabled? Defaults to
false. Changing this forces a new resource to be created.
- data
Disks List<ImageData Disk> - One or more
data_diskelements as defined below. - hyper
VGeneration String - The HyperVGenerationType of the VirtualMachine created from the image as
V1,V2. The default isV1. - location String
- Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name String
- Specifies the name of the image. Changing this forces a new resource to be created.
- os
Disk ImageOs Disk - One or more
os_diskelements as defined below. - resource
Group StringName - The name of the resource group in which to create the image. Changing this forces a new resource to be created.
- source
Virtual StringMachine Id - The Virtual Machine ID from which to create the image.
- Map<String,String>
- A mapping of tags to assign to the resource.
- zone
Resilient Boolean - Is zone resiliency enabled? Defaults to
false. Changing this forces a new resource to be created.
- data
Disks ImageData Disk[] - One or more
data_diskelements as defined below. - hyper
VGeneration string - The HyperVGenerationType of the VirtualMachine created from the image as
V1,V2. The default isV1. - location string
- Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name string
- Specifies the name of the image. Changing this forces a new resource to be created.
- os
Disk ImageOs Disk - One or more
os_diskelements as defined below. - resource
Group stringName - The name of the resource group in which to create the image. Changing this forces a new resource to be created.
- source
Virtual stringMachine Id - The Virtual Machine ID from which to create the image.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- zone
Resilient boolean - Is zone resiliency enabled? Defaults to
false. Changing this forces a new resource to be created.
- data_
disks Sequence[ImageData Disk Args] - One or more
data_diskelements as defined below. - hyper_
v_ strgeneration - The HyperVGenerationType of the VirtualMachine created from the image as
V1,V2. The default isV1. - location str
- Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name str
- Specifies the name of the image. Changing this forces a new resource to be created.
- os_
disk ImageOs Disk Args - One or more
os_diskelements as defined below. - resource_
group_ strname - The name of the resource group in which to create the image. Changing this forces a new resource to be created.
- source_
virtual_ strmachine_ id - The Virtual Machine ID from which to create the image.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- zone_
resilient bool - Is zone resiliency enabled? Defaults to
false. Changing this forces a new resource to be created.
- data
Disks List<Property Map> - One or more
data_diskelements as defined below. - hyper
VGeneration String - The HyperVGenerationType of the VirtualMachine created from the image as
V1,V2. The default isV1. - location String
- Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name String
- Specifies the name of the image. Changing this forces a new resource to be created.
- os
Disk Property Map - One or more
os_diskelements as defined below. - resource
Group StringName - The name of the resource group in which to create the image. Changing this forces a new resource to be created.
- source
Virtual StringMachine Id - The Virtual Machine ID from which to create the image.
- Map<String>
- A mapping of tags to assign to the resource.
- zone
Resilient Boolean - Is zone resiliency enabled? Defaults to
false. Changing this forces a new resource to be created.
Supporting Types
ImageDataDisk, ImageDataDiskArgs
- Blob
Uri string - Specifies the URI in Azure storage of the blob that you want to use to create the image.
- Caching string
- Specifies the caching mode as
ReadWrite,ReadOnly, orNone. The default isNone. - Lun int
- Specifies the logical unit number of the data disk.
- Managed
Disk stringId - Specifies the ID of the managed disk resource that you want to use to create the image.
- Size
Gb int - Specifies the size of the image to be created. The target size can't be smaller than the source size.
- Blob
Uri string - Specifies the URI in Azure storage of the blob that you want to use to create the image.
- Caching string
- Specifies the caching mode as
ReadWrite,ReadOnly, orNone. The default isNone. - Lun int
- Specifies the logical unit number of the data disk.
- Managed
Disk stringId - Specifies the ID of the managed disk resource that you want to use to create the image.
- Size
Gb int - Specifies the size of the image to be created. The target size can't be smaller than the source size.
- blob
Uri String - Specifies the URI in Azure storage of the blob that you want to use to create the image.
- caching String
- Specifies the caching mode as
ReadWrite,ReadOnly, orNone. The default isNone. - lun Integer
- Specifies the logical unit number of the data disk.
- managed
Disk StringId - Specifies the ID of the managed disk resource that you want to use to create the image.
- size
Gb Integer - Specifies the size of the image to be created. The target size can't be smaller than the source size.
- blob
Uri string - Specifies the URI in Azure storage of the blob that you want to use to create the image.
- caching string
- Specifies the caching mode as
ReadWrite,ReadOnly, orNone. The default isNone. - lun number
- Specifies the logical unit number of the data disk.
- managed
Disk stringId - Specifies the ID of the managed disk resource that you want to use to create the image.
- size
Gb number - Specifies the size of the image to be created. The target size can't be smaller than the source size.
- blob_
uri str - Specifies the URI in Azure storage of the blob that you want to use to create the image.
- caching str
- Specifies the caching mode as
ReadWrite,ReadOnly, orNone. The default isNone. - lun int
- Specifies the logical unit number of the data disk.
- managed_
disk_ strid - Specifies the ID of the managed disk resource that you want to use to create the image.
- size_
gb int - Specifies the size of the image to be created. The target size can't be smaller than the source size.
- blob
Uri String - Specifies the URI in Azure storage of the blob that you want to use to create the image.
- caching String
- Specifies the caching mode as
ReadWrite,ReadOnly, orNone. The default isNone. - lun Number
- Specifies the logical unit number of the data disk.
- managed
Disk StringId - Specifies the ID of the managed disk resource that you want to use to create the image.
- size
Gb Number - Specifies the size of the image to be created. The target size can't be smaller than the source size.
ImageOsDisk, ImageOsDiskArgs
- Blob
Uri string - Specifies the URI in Azure storage of the blob that you want to use to create the image.
- Caching string
- Specifies the caching mode as
ReadWrite,ReadOnly, orNone. The default isNone. - Managed
Disk stringId - Specifies the ID of the managed disk resource that you want to use to create the image.
- Os
State string - Specifies the state of the operating system contained in the blob. Currently, the only value is Generalized.
- Os
Type string - Specifies the type of operating system contained in the virtual machine image. Possible values are: Windows or Linux.
- Size
Gb int - Specifies the size of the image to be created. The target size can't be smaller than the source size.
- Blob
Uri string - Specifies the URI in Azure storage of the blob that you want to use to create the image.
- Caching string
- Specifies the caching mode as
ReadWrite,ReadOnly, orNone. The default isNone. - Managed
Disk stringId - Specifies the ID of the managed disk resource that you want to use to create the image.
- Os
State string - Specifies the state of the operating system contained in the blob. Currently, the only value is Generalized.
- Os
Type string - Specifies the type of operating system contained in the virtual machine image. Possible values are: Windows or Linux.
- Size
Gb int - Specifies the size of the image to be created. The target size can't be smaller than the source size.
- blob
Uri String - Specifies the URI in Azure storage of the blob that you want to use to create the image.
- caching String
- Specifies the caching mode as
ReadWrite,ReadOnly, orNone. The default isNone. - managed
Disk StringId - Specifies the ID of the managed disk resource that you want to use to create the image.
- os
State String - Specifies the state of the operating system contained in the blob. Currently, the only value is Generalized.
- os
Type String - Specifies the type of operating system contained in the virtual machine image. Possible values are: Windows or Linux.
- size
Gb Integer - Specifies the size of the image to be created. The target size can't be smaller than the source size.
- blob
Uri string - Specifies the URI in Azure storage of the blob that you want to use to create the image.
- caching string
- Specifies the caching mode as
ReadWrite,ReadOnly, orNone. The default isNone. - managed
Disk stringId - Specifies the ID of the managed disk resource that you want to use to create the image.
- os
State string - Specifies the state of the operating system contained in the blob. Currently, the only value is Generalized.
- os
Type string - Specifies the type of operating system contained in the virtual machine image. Possible values are: Windows or Linux.
- size
Gb number - Specifies the size of the image to be created. The target size can't be smaller than the source size.
- blob_
uri str - Specifies the URI in Azure storage of the blob that you want to use to create the image.
- caching str
- Specifies the caching mode as
ReadWrite,ReadOnly, orNone. The default isNone. - managed_
disk_ strid - Specifies the ID of the managed disk resource that you want to use to create the image.
- os_
state str - Specifies the state of the operating system contained in the blob. Currently, the only value is Generalized.
- os_
type str - Specifies the type of operating system contained in the virtual machine image. Possible values are: Windows or Linux.
- size_
gb int - Specifies the size of the image to be created. The target size can't be smaller than the source size.
- blob
Uri String - Specifies the URI in Azure storage of the blob that you want to use to create the image.
- caching String
- Specifies the caching mode as
ReadWrite,ReadOnly, orNone. The default isNone. - managed
Disk StringId - Specifies the ID of the managed disk resource that you want to use to create the image.
- os
State String - Specifies the state of the operating system contained in the blob. Currently, the only value is Generalized.
- os
Type String - Specifies the type of operating system contained in the virtual machine image. Possible values are: Windows or Linux.
- size
Gb Number - Specifies the size of the image to be created. The target size can't be smaller than the source size.
Import
Images can be imported using the resource id, e.g.
$ pulumi import azure:compute/image:Image example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/microsoft.compute/images/image1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
