VolumeSnapshot

Provides a DigitalOcean Volume Snapshot which can be used to create a snapshot from an existing volume.

Example Usage

using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;

class MyStack : Stack
{
    public MyStack()
    {
        var foobarVolume = new DigitalOcean.Volume("foobarVolume", new DigitalOcean.VolumeArgs
        {
            Region = "nyc1",
            Size = 100,
            Description = "an example volume",
        });
        var foobarVolumeSnapshot = new DigitalOcean.VolumeSnapshot("foobarVolumeSnapshot", new DigitalOcean.VolumeSnapshotArgs
        {
            VolumeId = foobarVolume.Id,
        });
    }

}

Coming soon!

import pulumi
import pulumi_digitalocean as digitalocean

foobar_volume = digitalocean.Volume("foobarVolume",
    region="nyc1",
    size=100,
    description="an example volume")
foobar_volume_snapshot = digitalocean.VolumeSnapshot("foobarVolumeSnapshot", volume_id=foobar_volume.id)
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";

const foobarVolume = new digitalocean.Volume("foobarVolume", {
    region: "nyc1",
    size: 100,
    description: "an example volume",
});
const foobarVolumeSnapshot = new digitalocean.VolumeSnapshot("foobarVolumeSnapshot", {volumeId: foobarVolume.id});

Create a VolumeSnapshot Resource

def VolumeSnapshot(resource_name, opts=None, name=None, tags=None, volume_id=None, __props__=None);
name string
The unique name of the resource.
args VolumeSnapshotArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args VolumeSnapshotArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args VolumeSnapshotArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

VolumeSnapshot Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The VolumeSnapshot resource accepts the following input properties:

VolumeId string

The ID of the volume from which the volume snapshot originated.

Name string

A name for the volume snapshot.

Tags List<string>

A list of the tags to be applied to this volume snapshot.

VolumeId string

The ID of the volume from which the volume snapshot originated.

Name string

A name for the volume snapshot.

Tags []string

A list of the tags to be applied to this volume snapshot.

volumeId string

The ID of the volume from which the volume snapshot originated.

name string

A name for the volume snapshot.

tags string[]

A list of the tags to be applied to this volume snapshot.

volume_id str

The ID of the volume from which the volume snapshot originated.

name str

A name for the volume snapshot.

tags List[str]

A list of the tags to be applied to this volume snapshot.

Outputs

All input properties are implicitly available as output properties. Additionally, the VolumeSnapshot resource produces the following output properties:

CreatedAt string

The date and time the volume snapshot was created.

Id string
The provider-assigned unique ID for this managed resource.
MinDiskSize int

The minimum size in gigabytes required for a volume to be created based on this volume snapshot.

Regions List<string>

A list of DigitalOcean region “slugs” indicating where the volume snapshot is available.

Size double

The billable size of the volume snapshot in gigabytes.

CreatedAt string

The date and time the volume snapshot was created.

Id string
The provider-assigned unique ID for this managed resource.
MinDiskSize int

The minimum size in gigabytes required for a volume to be created based on this volume snapshot.

Regions []string

A list of DigitalOcean region “slugs” indicating where the volume snapshot is available.

Size float64

The billable size of the volume snapshot in gigabytes.

createdAt string

The date and time the volume snapshot was created.

id string
The provider-assigned unique ID for this managed resource.
minDiskSize number

The minimum size in gigabytes required for a volume to be created based on this volume snapshot.

regions Region[]

A list of DigitalOcean region “slugs” indicating where the volume snapshot is available.

size number

The billable size of the volume snapshot in gigabytes.

created_at str

The date and time the volume snapshot was created.

id str
The provider-assigned unique ID for this managed resource.
min_disk_size float

The minimum size in gigabytes required for a volume to be created based on this volume snapshot.

regions List[Region]

A list of DigitalOcean region “slugs” indicating where the volume snapshot is available.

size float

The billable size of the volume snapshot in gigabytes.

Look up an Existing VolumeSnapshot Resource

Get an existing VolumeSnapshot 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?: VolumeSnapshotState, opts?: CustomResourceOptions): VolumeSnapshot
static get(resource_name, id, opts=None, created_at=None, min_disk_size=None, name=None, regions=None, size=None, tags=None, volume_id=None, __props__=None);
func GetVolumeSnapshot(ctx *Context, name string, id IDInput, state *VolumeSnapshotState, opts ...ResourceOption) (*VolumeSnapshot, error)
public static VolumeSnapshot Get(string name, Input<string> id, VolumeSnapshotState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

CreatedAt string

The date and time the volume snapshot was created.

MinDiskSize int

The minimum size in gigabytes required for a volume to be created based on this volume snapshot.

Name string

A name for the volume snapshot.

Regions List<string>

A list of DigitalOcean region “slugs” indicating where the volume snapshot is available.

Size double

The billable size of the volume snapshot in gigabytes.

Tags List<string>

A list of the tags to be applied to this volume snapshot.

VolumeId string

The ID of the volume from which the volume snapshot originated.

CreatedAt string

The date and time the volume snapshot was created.

MinDiskSize int

The minimum size in gigabytes required for a volume to be created based on this volume snapshot.

Name string

A name for the volume snapshot.

Regions []string

A list of DigitalOcean region “slugs” indicating where the volume snapshot is available.

Size float64

The billable size of the volume snapshot in gigabytes.

Tags []string

A list of the tags to be applied to this volume snapshot.

VolumeId string

The ID of the volume from which the volume snapshot originated.

createdAt string

The date and time the volume snapshot was created.

minDiskSize number

The minimum size in gigabytes required for a volume to be created based on this volume snapshot.

name string

A name for the volume snapshot.

regions Region[]

A list of DigitalOcean region “slugs” indicating where the volume snapshot is available.

size number

The billable size of the volume snapshot in gigabytes.

tags string[]

A list of the tags to be applied to this volume snapshot.

volumeId string

The ID of the volume from which the volume snapshot originated.

created_at str

The date and time the volume snapshot was created.

min_disk_size float

The minimum size in gigabytes required for a volume to be created based on this volume snapshot.

name str

A name for the volume snapshot.

regions List[Region]

A list of DigitalOcean region “slugs” indicating where the volume snapshot is available.

size float

The billable size of the volume snapshot in gigabytes.

tags List[str]

A list of the tags to be applied to this volume snapshot.

volume_id str

The ID of the volume from which the volume snapshot originated.

Package Details

Repository
https://github.com/pulumi/pulumi-digitalocean
License
Apache-2.0
Notes
This Pulumi package is based on the digitalocean Terraform Provider.