1. Packages
  2. Azure Classic
  3. API Docs
  4. compute
  5. Snapshot

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Manages a Disk Snapshot.

    Example Usage

    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 exampleManagedDisk = new Azure.Compute.ManagedDisk("exampleManagedDisk", new Azure.Compute.ManagedDiskArgs
            {
                Location = exampleResourceGroup.Location,
                ResourceGroupName = exampleResourceGroup.Name,
                StorageAccountType = "Standard_LRS",
                CreateOption = "Empty",
                DiskSizeGb = 10,
            });
            var exampleSnapshot = new Azure.Compute.Snapshot("exampleSnapshot", new Azure.Compute.SnapshotArgs
            {
                Location = exampleResourceGroup.Location,
                ResourceGroupName = exampleResourceGroup.Name,
                CreateOption = "Copy",
                SourceUri = exampleManagedDisk.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
    		}
    		exampleManagedDisk, err := compute.NewManagedDisk(ctx, "exampleManagedDisk", &compute.ManagedDiskArgs{
    			Location:           exampleResourceGroup.Location,
    			ResourceGroupName:  exampleResourceGroup.Name,
    			StorageAccountType: pulumi.String("Standard_LRS"),
    			CreateOption:       pulumi.String("Empty"),
    			DiskSizeGb:         pulumi.Int(10),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewSnapshot(ctx, "exampleSnapshot", &compute.SnapshotArgs{
    			Location:          exampleResourceGroup.Location,
    			ResourceGroupName: exampleResourceGroup.Name,
    			CreateOption:      pulumi.String("Copy"),
    			SourceUri:         exampleManagedDisk.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 exampleManagedDisk = new azure.compute.ManagedDisk("exampleManagedDisk", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        storageAccountType: "Standard_LRS",
        createOption: "Empty",
        diskSizeGb: "10",
    });
    const exampleSnapshot = new azure.compute.Snapshot("exampleSnapshot", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        createOption: "Copy",
        sourceUri: exampleManagedDisk.id,
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    example_managed_disk = azure.compute.ManagedDisk("exampleManagedDisk",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        storage_account_type="Standard_LRS",
        create_option="Empty",
        disk_size_gb=10)
    example_snapshot = azure.compute.Snapshot("exampleSnapshot",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        create_option="Copy",
        source_uri=example_managed_disk.id)
    

    Example coming soon!

    Create Snapshot Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Snapshot(name: string, args: SnapshotArgs, opts?: CustomResourceOptions);
    @overload
    def Snapshot(resource_name: str,
                 args: SnapshotArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Snapshot(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 create_option: Optional[str] = None,
                 resource_group_name: Optional[str] = None,
                 disk_size_gb: Optional[int] = None,
                 encryption_settings: Optional[SnapshotEncryptionSettingsArgs] = None,
                 location: Optional[str] = None,
                 name: Optional[str] = None,
                 source_resource_id: Optional[str] = None,
                 source_uri: Optional[str] = None,
                 storage_account_id: Optional[str] = None,
                 tags: Optional[Mapping[str, str]] = None)
    func NewSnapshot(ctx *Context, name string, args SnapshotArgs, opts ...ResourceOption) (*Snapshot, error)
    public Snapshot(string name, SnapshotArgs args, CustomResourceOptions? opts = null)
    public Snapshot(String name, SnapshotArgs args)
    public Snapshot(String name, SnapshotArgs args, CustomResourceOptions options)
    
    type: azure:compute:Snapshot
    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 SnapshotArgs
    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 SnapshotArgs
    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 SnapshotArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SnapshotArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SnapshotArgs
    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 snapshotResource = new Azure.Compute.Snapshot("snapshotResource", new()
    {
        CreateOption = "string",
        ResourceGroupName = "string",
        DiskSizeGb = 0,
        EncryptionSettings = new Azure.Compute.Inputs.SnapshotEncryptionSettingsArgs
        {
            Enabled = false,
            DiskEncryptionKey = new Azure.Compute.Inputs.SnapshotEncryptionSettingsDiskEncryptionKeyArgs
            {
                SecretUrl = "string",
                SourceVaultId = "string",
            },
            KeyEncryptionKey = new Azure.Compute.Inputs.SnapshotEncryptionSettingsKeyEncryptionKeyArgs
            {
                KeyUrl = "string",
                SourceVaultId = "string",
            },
        },
        Location = "string",
        Name = "string",
        SourceResourceId = "string",
        SourceUri = "string",
        StorageAccountId = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := compute.NewSnapshot(ctx, "snapshotResource", &compute.SnapshotArgs{
    	CreateOption:      pulumi.String("string"),
    	ResourceGroupName: pulumi.String("string"),
    	DiskSizeGb:        pulumi.Int(0),
    	EncryptionSettings: &compute.SnapshotEncryptionSettingsArgs{
    		Enabled: pulumi.Bool(false),
    		DiskEncryptionKey: &compute.SnapshotEncryptionSettingsDiskEncryptionKeyArgs{
    			SecretUrl:     pulumi.String("string"),
    			SourceVaultId: pulumi.String("string"),
    		},
    		KeyEncryptionKey: &compute.SnapshotEncryptionSettingsKeyEncryptionKeyArgs{
    			KeyUrl:        pulumi.String("string"),
    			SourceVaultId: pulumi.String("string"),
    		},
    	},
    	Location:         pulumi.String("string"),
    	Name:             pulumi.String("string"),
    	SourceResourceId: pulumi.String("string"),
    	SourceUri:        pulumi.String("string"),
    	StorageAccountId: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var snapshotResource = new com.pulumi.azure.compute.Snapshot("snapshotResource", com.pulumi.azure.compute.SnapshotArgs.builder()
        .createOption("string")
        .resourceGroupName("string")
        .diskSizeGb(0)
        .encryptionSettings(SnapshotEncryptionSettingsArgs.builder()
            .enabled(false)
            .diskEncryptionKey(SnapshotEncryptionSettingsDiskEncryptionKeyArgs.builder()
                .secretUrl("string")
                .sourceVaultId("string")
                .build())
            .keyEncryptionKey(SnapshotEncryptionSettingsKeyEncryptionKeyArgs.builder()
                .keyUrl("string")
                .sourceVaultId("string")
                .build())
            .build())
        .location("string")
        .name("string")
        .sourceResourceId("string")
        .sourceUri("string")
        .storageAccountId("string")
        .tags(Map.of("string", "string"))
        .build());
    
    snapshot_resource = azure.compute.Snapshot("snapshotResource",
        create_option="string",
        resource_group_name="string",
        disk_size_gb=0,
        encryption_settings={
            "enabled": False,
            "disk_encryption_key": {
                "secret_url": "string",
                "source_vault_id": "string",
            },
            "key_encryption_key": {
                "key_url": "string",
                "source_vault_id": "string",
            },
        },
        location="string",
        name="string",
        source_resource_id="string",
        source_uri="string",
        storage_account_id="string",
        tags={
            "string": "string",
        })
    
    const snapshotResource = new azure.compute.Snapshot("snapshotResource", {
        createOption: "string",
        resourceGroupName: "string",
        diskSizeGb: 0,
        encryptionSettings: {
            enabled: false,
            diskEncryptionKey: {
                secretUrl: "string",
                sourceVaultId: "string",
            },
            keyEncryptionKey: {
                keyUrl: "string",
                sourceVaultId: "string",
            },
        },
        location: "string",
        name: "string",
        sourceResourceId: "string",
        sourceUri: "string",
        storageAccountId: "string",
        tags: {
            string: "string",
        },
    });
    
    type: azure:compute:Snapshot
    properties:
        createOption: string
        diskSizeGb: 0
        encryptionSettings:
            diskEncryptionKey:
                secretUrl: string
                sourceVaultId: string
            enabled: false
            keyEncryptionKey:
                keyUrl: string
                sourceVaultId: string
        location: string
        name: string
        resourceGroupName: string
        sourceResourceId: string
        sourceUri: string
        storageAccountId: string
        tags:
            string: string
    

    Snapshot 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 Snapshot resource accepts the following input properties:

    CreateOption string
    Indicates how the snapshot is to be created. Possible values are Copy or Import. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group in which to create the Snapshot. Changing this forces a new resource to be created.
    DiskSizeGb int
    The size of the Snapshotted Disk in GB.
    EncryptionSettings SnapshotEncryptionSettings
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the Snapshot resource. Changing this forces a new resource to be created.
    SourceResourceId string
    Specifies a reference to an existing snapshot, when create_option is Copy. Changing this forces a new resource to be created.
    SourceUri string
    Specifies the URI to a Managed or Unmanaged Disk. Changing this forces a new resource to be created.
    StorageAccountId string
    Specifies the ID of an storage account. Used with source_uri to allow authorization during import of unmanaged blobs from a different subscription. Changing this forces a new resource to be created.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    CreateOption string
    Indicates how the snapshot is to be created. Possible values are Copy or Import. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group in which to create the Snapshot. Changing this forces a new resource to be created.
    DiskSizeGb int
    The size of the Snapshotted Disk in GB.
    EncryptionSettings SnapshotEncryptionSettingsArgs
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the Snapshot resource. Changing this forces a new resource to be created.
    SourceResourceId string
    Specifies a reference to an existing snapshot, when create_option is Copy. Changing this forces a new resource to be created.
    SourceUri string
    Specifies the URI to a Managed or Unmanaged Disk. Changing this forces a new resource to be created.
    StorageAccountId string
    Specifies the ID of an storage account. Used with source_uri to allow authorization during import of unmanaged blobs from a different subscription. Changing this forces a new resource to be created.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    createOption String
    Indicates how the snapshot is to be created. Possible values are Copy or Import. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group in which to create the Snapshot. Changing this forces a new resource to be created.
    diskSizeGb Integer
    The size of the Snapshotted Disk in GB.
    encryptionSettings SnapshotEncryptionSettings
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name String
    Specifies the name of the Snapshot resource. Changing this forces a new resource to be created.
    sourceResourceId String
    Specifies a reference to an existing snapshot, when create_option is Copy. Changing this forces a new resource to be created.
    sourceUri String
    Specifies the URI to a Managed or Unmanaged Disk. Changing this forces a new resource to be created.
    storageAccountId String
    Specifies the ID of an storage account. Used with source_uri to allow authorization during import of unmanaged blobs from a different subscription. Changing this forces a new resource to be created.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    createOption string
    Indicates how the snapshot is to be created. Possible values are Copy or Import. Changing this forces a new resource to be created.
    resourceGroupName string
    The name of the resource group in which to create the Snapshot. Changing this forces a new resource to be created.
    diskSizeGb number
    The size of the Snapshotted Disk in GB.
    encryptionSettings SnapshotEncryptionSettings
    location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name string
    Specifies the name of the Snapshot resource. Changing this forces a new resource to be created.
    sourceResourceId string
    Specifies a reference to an existing snapshot, when create_option is Copy. Changing this forces a new resource to be created.
    sourceUri string
    Specifies the URI to a Managed or Unmanaged Disk. Changing this forces a new resource to be created.
    storageAccountId string
    Specifies the ID of an storage account. Used with source_uri to allow authorization during import of unmanaged blobs from a different subscription. Changing this forces a new resource to be created.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    create_option str
    Indicates how the snapshot is to be created. Possible values are Copy or Import. Changing this forces a new resource to be created.
    resource_group_name str
    The name of the resource group in which to create the Snapshot. Changing this forces a new resource to be created.
    disk_size_gb int
    The size of the Snapshotted Disk in GB.
    encryption_settings SnapshotEncryptionSettingsArgs
    location str
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name str
    Specifies the name of the Snapshot resource. Changing this forces a new resource to be created.
    source_resource_id str
    Specifies a reference to an existing snapshot, when create_option is Copy. Changing this forces a new resource to be created.
    source_uri str
    Specifies the URI to a Managed or Unmanaged Disk. Changing this forces a new resource to be created.
    storage_account_id str
    Specifies the ID of an storage account. Used with source_uri to allow authorization during import of unmanaged blobs from a different subscription. Changing this forces a new resource to be created.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    createOption String
    Indicates how the snapshot is to be created. Possible values are Copy or Import. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group in which to create the Snapshot. Changing this forces a new resource to be created.
    diskSizeGb Number
    The size of the Snapshotted Disk in GB.
    encryptionSettings Property Map
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name String
    Specifies the name of the Snapshot resource. Changing this forces a new resource to be created.
    sourceResourceId String
    Specifies a reference to an existing snapshot, when create_option is Copy. Changing this forces a new resource to be created.
    sourceUri String
    Specifies the URI to a Managed or Unmanaged Disk. Changing this forces a new resource to be created.
    storageAccountId String
    Specifies the ID of an storage account. Used with source_uri to allow authorization during import of unmanaged blobs from a different subscription. Changing this forces a new resource to be created.
    tags Map<String>
    A mapping of tags to assign to the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Snapshot 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 Snapshot Resource

    Get an existing Snapshot 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?: SnapshotState, opts?: CustomResourceOptions): Snapshot
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_option: Optional[str] = None,
            disk_size_gb: Optional[int] = None,
            encryption_settings: Optional[SnapshotEncryptionSettingsArgs] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            source_resource_id: Optional[str] = None,
            source_uri: Optional[str] = None,
            storage_account_id: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None) -> Snapshot
    func GetSnapshot(ctx *Context, name string, id IDInput, state *SnapshotState, opts ...ResourceOption) (*Snapshot, error)
    public static Snapshot Get(string name, Input<string> id, SnapshotState? state, CustomResourceOptions? opts = null)
    public static Snapshot get(String name, Output<String> id, SnapshotState state, CustomResourceOptions options)
    resources:  _:    type: azure:compute:Snapshot    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.
    The following state arguments are supported:
    CreateOption string
    Indicates how the snapshot is to be created. Possible values are Copy or Import. Changing this forces a new resource to be created.
    DiskSizeGb int
    The size of the Snapshotted Disk in GB.
    EncryptionSettings SnapshotEncryptionSettings
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the Snapshot resource. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group in which to create the Snapshot. Changing this forces a new resource to be created.
    SourceResourceId string
    Specifies a reference to an existing snapshot, when create_option is Copy. Changing this forces a new resource to be created.
    SourceUri string
    Specifies the URI to a Managed or Unmanaged Disk. Changing this forces a new resource to be created.
    StorageAccountId string
    Specifies the ID of an storage account. Used with source_uri to allow authorization during import of unmanaged blobs from a different subscription. Changing this forces a new resource to be created.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    CreateOption string
    Indicates how the snapshot is to be created. Possible values are Copy or Import. Changing this forces a new resource to be created.
    DiskSizeGb int
    The size of the Snapshotted Disk in GB.
    EncryptionSettings SnapshotEncryptionSettingsArgs
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the Snapshot resource. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group in which to create the Snapshot. Changing this forces a new resource to be created.
    SourceResourceId string
    Specifies a reference to an existing snapshot, when create_option is Copy. Changing this forces a new resource to be created.
    SourceUri string
    Specifies the URI to a Managed or Unmanaged Disk. Changing this forces a new resource to be created.
    StorageAccountId string
    Specifies the ID of an storage account. Used with source_uri to allow authorization during import of unmanaged blobs from a different subscription. Changing this forces a new resource to be created.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    createOption String
    Indicates how the snapshot is to be created. Possible values are Copy or Import. Changing this forces a new resource to be created.
    diskSizeGb Integer
    The size of the Snapshotted Disk in GB.
    encryptionSettings SnapshotEncryptionSettings
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name String
    Specifies the name of the Snapshot resource. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group in which to create the Snapshot. Changing this forces a new resource to be created.
    sourceResourceId String
    Specifies a reference to an existing snapshot, when create_option is Copy. Changing this forces a new resource to be created.
    sourceUri String
    Specifies the URI to a Managed or Unmanaged Disk. Changing this forces a new resource to be created.
    storageAccountId String
    Specifies the ID of an storage account. Used with source_uri to allow authorization during import of unmanaged blobs from a different subscription. Changing this forces a new resource to be created.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    createOption string
    Indicates how the snapshot is to be created. Possible values are Copy or Import. Changing this forces a new resource to be created.
    diskSizeGb number
    The size of the Snapshotted Disk in GB.
    encryptionSettings SnapshotEncryptionSettings
    location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name string
    Specifies the name of the Snapshot resource. Changing this forces a new resource to be created.
    resourceGroupName string
    The name of the resource group in which to create the Snapshot. Changing this forces a new resource to be created.
    sourceResourceId string
    Specifies a reference to an existing snapshot, when create_option is Copy. Changing this forces a new resource to be created.
    sourceUri string
    Specifies the URI to a Managed or Unmanaged Disk. Changing this forces a new resource to be created.
    storageAccountId string
    Specifies the ID of an storage account. Used with source_uri to allow authorization during import of unmanaged blobs from a different subscription. Changing this forces a new resource to be created.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    create_option str
    Indicates how the snapshot is to be created. Possible values are Copy or Import. Changing this forces a new resource to be created.
    disk_size_gb int
    The size of the Snapshotted Disk in GB.
    encryption_settings SnapshotEncryptionSettingsArgs
    location str
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name str
    Specifies the name of the Snapshot resource. Changing this forces a new resource to be created.
    resource_group_name str
    The name of the resource group in which to create the Snapshot. Changing this forces a new resource to be created.
    source_resource_id str
    Specifies a reference to an existing snapshot, when create_option is Copy. Changing this forces a new resource to be created.
    source_uri str
    Specifies the URI to a Managed or Unmanaged Disk. Changing this forces a new resource to be created.
    storage_account_id str
    Specifies the ID of an storage account. Used with source_uri to allow authorization during import of unmanaged blobs from a different subscription. Changing this forces a new resource to be created.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    createOption String
    Indicates how the snapshot is to be created. Possible values are Copy or Import. Changing this forces a new resource to be created.
    diskSizeGb Number
    The size of the Snapshotted Disk in GB.
    encryptionSettings Property Map
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name String
    Specifies the name of the Snapshot resource. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group in which to create the Snapshot. Changing this forces a new resource to be created.
    sourceResourceId String
    Specifies a reference to an existing snapshot, when create_option is Copy. Changing this forces a new resource to be created.
    sourceUri String
    Specifies the URI to a Managed or Unmanaged Disk. Changing this forces a new resource to be created.
    storageAccountId String
    Specifies the ID of an storage account. Used with source_uri to allow authorization during import of unmanaged blobs from a different subscription. Changing this forces a new resource to be created.
    tags Map<String>
    A mapping of tags to assign to the resource.

    Supporting Types

    SnapshotEncryptionSettings, SnapshotEncryptionSettingsArgs

    SnapshotEncryptionSettingsDiskEncryptionKey, SnapshotEncryptionSettingsDiskEncryptionKeyArgs

    SnapshotEncryptionSettingsKeyEncryptionKey, SnapshotEncryptionSettingsKeyEncryptionKeyArgs

    KeyUrl string
    SourceVaultId string
    KeyUrl string
    SourceVaultId string
    keyUrl String
    sourceVaultId String
    keyUrl string
    sourceVaultId string
    keyUrl String
    sourceVaultId String

    Import

    Snapshots can be imported using the resource id, e.g.

     $ pulumi import azure:compute/snapshot:Snapshot example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/snapshots/snapshot1
    

    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 azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.