DropletSnapshot
Provides a resource which can be used to create a snapshot from an existing DigitalOcean Droplet.
Example Usage
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;
class MyStack : Stack
{
public MyStack()
{
var web = new DigitalOcean.Droplet("web", new DigitalOcean.DropletArgs
{
Size = "s-1vcpu-1gb",
Image = "centos-7-x64",
Region = "nyc3",
});
var web_snapshot = new DigitalOcean.DropletSnapshot("web-snapshot", new DigitalOcean.DropletSnapshotArgs
{
DropletId = web.Id,
});
}
}
Coming soon!
import pulumi
import pulumi_digitalocean as digitalocean
web = digitalocean.Droplet("web",
size="s-1vcpu-1gb",
image="centos-7-x64",
region="nyc3")
web_snapshot = digitalocean.DropletSnapshot("web-snapshot", droplet_id=web.id)import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const web = new digitalocean.Droplet("web", {
size: "s-1vcpu-1gb",
image: "centos-7-x64",
region: "nyc3",
});
const web_snapshot = new digitalocean.DropletSnapshot("web-snapshot", {dropletId: web.id});Create a DropletSnapshot Resource
new DropletSnapshot(name: string, args: DropletSnapshotArgs, opts?: CustomResourceOptions);def DropletSnapshot(resource_name, opts=None, droplet_id=None, name=None, __props__=None);func NewDropletSnapshot(ctx *Context, name string, args DropletSnapshotArgs, opts ...ResourceOption) (*DropletSnapshot, error)public DropletSnapshot(string name, DropletSnapshotArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args DropletSnapshotArgs
- 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 DropletSnapshotArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DropletSnapshotArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
DropletSnapshot Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The DropletSnapshot resource accepts the following input properties:
- droplet_
id str The ID of the Droplet from which the snapshot will be taken.
- name str
A name for the Droplet snapshot.
Outputs
All input properties are implicitly available as output properties. Additionally, the DropletSnapshot resource produces the following output properties:
- Created
At string The date and time the Droplet snapshot was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Min
Disk intSize The minimum size in gigabytes required for a Droplet to be created based on this snapshot.
- Regions List<string>
A list of DigitalOcean region “slugs” indicating where the droplet snapshot is available.
- Size double
The billable size of the Droplet snapshot in gigabytes.
- Created
At string The date and time the Droplet snapshot was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Min
Disk intSize The minimum size in gigabytes required for a Droplet to be created based on this snapshot.
- Regions []string
A list of DigitalOcean region “slugs” indicating where the droplet snapshot is available.
- Size float64
The billable size of the Droplet snapshot in gigabytes.
- created
At string The date and time the Droplet snapshot was created.
- id string
- The provider-assigned unique ID for this managed resource.
- min
Disk numberSize The minimum size in gigabytes required for a Droplet to be created based on this snapshot.
- regions Region[]
A list of DigitalOcean region “slugs” indicating where the droplet snapshot is available.
- size number
The billable size of the Droplet snapshot in gigabytes.
- created_
at str The date and time the Droplet snapshot was created.
- id str
- The provider-assigned unique ID for this managed resource.
- min_
disk_ floatsize The minimum size in gigabytes required for a Droplet to be created based on this snapshot.
- regions List[Region]
A list of DigitalOcean region “slugs” indicating where the droplet snapshot is available.
- size float
The billable size of the Droplet snapshot in gigabytes.
Look up an Existing DropletSnapshot Resource
Get an existing DropletSnapshot 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?: DropletSnapshotState, opts?: CustomResourceOptions): DropletSnapshotstatic get(resource_name, id, opts=None, created_at=None, droplet_id=None, min_disk_size=None, name=None, regions=None, size=None, __props__=None);func GetDropletSnapshot(ctx *Context, name string, id IDInput, state *DropletSnapshotState, opts ...ResourceOption) (*DropletSnapshot, error)public static DropletSnapshot Get(string name, Input<string> id, DropletSnapshotState? 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:
- Created
At string The date and time the Droplet snapshot was created.
- Droplet
Id string The ID of the Droplet from which the snapshot will be taken.
- Min
Disk intSize The minimum size in gigabytes required for a Droplet to be created based on this snapshot.
- Name string
A name for the Droplet snapshot.
- Regions List<string>
A list of DigitalOcean region “slugs” indicating where the droplet snapshot is available.
- Size double
The billable size of the Droplet snapshot in gigabytes.
- Created
At string The date and time the Droplet snapshot was created.
- Droplet
Id string The ID of the Droplet from which the snapshot will be taken.
- Min
Disk intSize The minimum size in gigabytes required for a Droplet to be created based on this snapshot.
- Name string
A name for the Droplet snapshot.
- Regions []string
A list of DigitalOcean region “slugs” indicating where the droplet snapshot is available.
- Size float64
The billable size of the Droplet snapshot in gigabytes.
- created
At string The date and time the Droplet snapshot was created.
- droplet
Id string The ID of the Droplet from which the snapshot will be taken.
- min
Disk numberSize The minimum size in gigabytes required for a Droplet to be created based on this snapshot.
- name string
A name for the Droplet snapshot.
- regions Region[]
A list of DigitalOcean region “slugs” indicating where the droplet snapshot is available.
- size number
The billable size of the Droplet snapshot in gigabytes.
- created_
at str The date and time the Droplet snapshot was created.
- droplet_
id str The ID of the Droplet from which the snapshot will be taken.
- min_
disk_ floatsize The minimum size in gigabytes required for a Droplet to be created based on this snapshot.
- name str
A name for the Droplet snapshot.
- regions List[Region]
A list of DigitalOcean region “slugs” indicating where the droplet snapshot is available.
- size float
The billable size of the Droplet snapshot in gigabytes.
Package Details
- Repository
- https://github.com/pulumi/pulumi-digitalocean
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
digitaloceanTerraform Provider.