Volume

Manages a single EBS volume.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Ebs.Volume("example", new Aws.Ebs.VolumeArgs
        {
            AvailabilityZone = "us-west-2a",
            Size = 40,
            Tags = 
            {
                { "Name", "HelloWorld" },
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ebs"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := ebs.NewVolume(ctx, "example", &ebs.VolumeArgs{
            AvailabilityZone: pulumi.String("us-west-2a"),
            Size:             pulumi.Int(40),
            Tags: pulumi.StringMap{
                "Name": pulumi.String("HelloWorld"),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.ebs.Volume("example",
    availability_zone="us-west-2a",
    size=40,
    tags={
        "Name": "HelloWorld",
    })
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.ebs.Volume("example", {
    availabilityZone: "us-west-2a",
    size: 40,
    tags: {
        Name: "HelloWorld",
    },
});

Create a Volume Resource

new Volume(name: string, args: VolumeArgs, opts?: CustomResourceOptions);
def Volume(resource_name, opts=None, availability_zone=None, encrypted=None, iops=None, kms_key_id=None, multi_attach_enabled=None, outpost_arn=None, size=None, snapshot_id=None, tags=None, type=None, __props__=None);
func NewVolume(ctx *Context, name string, args VolumeArgs, opts ...ResourceOption) (*Volume, error)
public Volume(string name, VolumeArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args VolumeArgs
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 VolumeArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args VolumeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Volume Resource Properties

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

Inputs

The Volume resource accepts the following input properties:

AvailabilityZone string

The AZ where the EBS volume will exist.

Encrypted bool

If true, the disk will be encrypted.

Iops int

The amount of IOPS to provision for the disk.

KmsKeyId string

The ARN for the KMS encryption key. When specifying kms_key_id, encrypted needs to be set to true.

MultiAttachEnabled bool

Specifies whether to enable Amazon EBS Multi-Attach. Multi-Attach is supported exclusively on io1 volumes.

OutpostArn string

The Amazon Resource Name (ARN) of the Outpost.

Size int

The size of the drive in GiBs.

SnapshotId string

A snapshot to base the EBS volume off of.

Tags Dictionary<string, string>

A map of tags to assign to the resource.

Type string

The type of EBS volume. Can be “standard”, “gp2”, “io1”, “sc1” or “st1” (Default: “gp2”).

AvailabilityZone string

The AZ where the EBS volume will exist.

Encrypted bool

If true, the disk will be encrypted.

Iops int

The amount of IOPS to provision for the disk.

KmsKeyId string

The ARN for the KMS encryption key. When specifying kms_key_id, encrypted needs to be set to true.

MultiAttachEnabled bool

Specifies whether to enable Amazon EBS Multi-Attach. Multi-Attach is supported exclusively on io1 volumes.

OutpostArn string

The Amazon Resource Name (ARN) of the Outpost.

Size int

The size of the drive in GiBs.

SnapshotId string

A snapshot to base the EBS volume off of.

Tags map[string]string

A map of tags to assign to the resource.

Type string

The type of EBS volume. Can be “standard”, “gp2”, “io1”, “sc1” or “st1” (Default: “gp2”).

availabilityZone string

The AZ where the EBS volume will exist.

encrypted boolean

If true, the disk will be encrypted.

iops number

The amount of IOPS to provision for the disk.

kmsKeyId string

The ARN for the KMS encryption key. When specifying kms_key_id, encrypted needs to be set to true.

multiAttachEnabled boolean

Specifies whether to enable Amazon EBS Multi-Attach. Multi-Attach is supported exclusively on io1 volumes.

outpostArn string

The Amazon Resource Name (ARN) of the Outpost.

size number

The size of the drive in GiBs.

snapshotId string

A snapshot to base the EBS volume off of.

tags {[key: string]: string}

A map of tags to assign to the resource.

type string

The type of EBS volume. Can be “standard”, “gp2”, “io1”, “sc1” or “st1” (Default: “gp2”).

availability_zone str

The AZ where the EBS volume will exist.

encrypted bool

If true, the disk will be encrypted.

iops float

The amount of IOPS to provision for the disk.

kms_key_id str

The ARN for the KMS encryption key. When specifying kms_key_id, encrypted needs to be set to true.

multi_attach_enabled bool

Specifies whether to enable Amazon EBS Multi-Attach. Multi-Attach is supported exclusively on io1 volumes.

outpost_arn str

The Amazon Resource Name (ARN) of the Outpost.

size float

The size of the drive in GiBs.

snapshot_id str

A snapshot to base the EBS volume off of.

tags Dict[str, str]

A map of tags to assign to the resource.

type str

The type of EBS volume. Can be “standard”, “gp2”, “io1”, “sc1” or “st1” (Default: “gp2”).

Outputs

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

Arn string

The volume ARN (e.g. arn:aws:ec2:us-east-1:0123456789012:volume/vol-59fcb34e).

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

The volume ARN (e.g. arn:aws:ec2:us-east-1:0123456789012:volume/vol-59fcb34e).

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

The volume ARN (e.g. arn:aws:ec2:us-east-1:0123456789012:volume/vol-59fcb34e).

id string
The provider-assigned unique ID for this managed resource.
arn str

The volume ARN (e.g. arn:aws:ec2:us-east-1:0123456789012:volume/vol-59fcb34e).

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

Look up an Existing Volume Resource

Get an existing Volume 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?: VolumeState, opts?: CustomResourceOptions): Volume
static get(resource_name, id, opts=None, arn=None, availability_zone=None, encrypted=None, iops=None, kms_key_id=None, multi_attach_enabled=None, outpost_arn=None, size=None, snapshot_id=None, tags=None, type=None, __props__=None);
func GetVolume(ctx *Context, name string, id IDInput, state *VolumeState, opts ...ResourceOption) (*Volume, error)
public static Volume Get(string name, Input<string> id, VolumeState? 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:

Arn string

The volume ARN (e.g. arn:aws:ec2:us-east-1:0123456789012:volume/vol-59fcb34e).

AvailabilityZone string

The AZ where the EBS volume will exist.

Encrypted bool

If true, the disk will be encrypted.

Iops int

The amount of IOPS to provision for the disk.

KmsKeyId string

The ARN for the KMS encryption key. When specifying kms_key_id, encrypted needs to be set to true.

MultiAttachEnabled bool

Specifies whether to enable Amazon EBS Multi-Attach. Multi-Attach is supported exclusively on io1 volumes.

OutpostArn string

The Amazon Resource Name (ARN) of the Outpost.

Size int

The size of the drive in GiBs.

SnapshotId string

A snapshot to base the EBS volume off of.

Tags Dictionary<string, string>

A map of tags to assign to the resource.

Type string

The type of EBS volume. Can be “standard”, “gp2”, “io1”, “sc1” or “st1” (Default: “gp2”).

Arn string

The volume ARN (e.g. arn:aws:ec2:us-east-1:0123456789012:volume/vol-59fcb34e).

AvailabilityZone string

The AZ where the EBS volume will exist.

Encrypted bool

If true, the disk will be encrypted.

Iops int

The amount of IOPS to provision for the disk.

KmsKeyId string

The ARN for the KMS encryption key. When specifying kms_key_id, encrypted needs to be set to true.

MultiAttachEnabled bool

Specifies whether to enable Amazon EBS Multi-Attach. Multi-Attach is supported exclusively on io1 volumes.

OutpostArn string

The Amazon Resource Name (ARN) of the Outpost.

Size int

The size of the drive in GiBs.

SnapshotId string

A snapshot to base the EBS volume off of.

Tags map[string]string

A map of tags to assign to the resource.

Type string

The type of EBS volume. Can be “standard”, “gp2”, “io1”, “sc1” or “st1” (Default: “gp2”).

arn string

The volume ARN (e.g. arn:aws:ec2:us-east-1:0123456789012:volume/vol-59fcb34e).

availabilityZone string

The AZ where the EBS volume will exist.

encrypted boolean

If true, the disk will be encrypted.

iops number

The amount of IOPS to provision for the disk.

kmsKeyId string

The ARN for the KMS encryption key. When specifying kms_key_id, encrypted needs to be set to true.

multiAttachEnabled boolean

Specifies whether to enable Amazon EBS Multi-Attach. Multi-Attach is supported exclusively on io1 volumes.

outpostArn string

The Amazon Resource Name (ARN) of the Outpost.

size number

The size of the drive in GiBs.

snapshotId string

A snapshot to base the EBS volume off of.

tags {[key: string]: string}

A map of tags to assign to the resource.

type string

The type of EBS volume. Can be “standard”, “gp2”, “io1”, “sc1” or “st1” (Default: “gp2”).

arn str

The volume ARN (e.g. arn:aws:ec2:us-east-1:0123456789012:volume/vol-59fcb34e).

availability_zone str

The AZ where the EBS volume will exist.

encrypted bool

If true, the disk will be encrypted.

iops float

The amount of IOPS to provision for the disk.

kms_key_id str

The ARN for the KMS encryption key. When specifying kms_key_id, encrypted needs to be set to true.

multi_attach_enabled bool

Specifies whether to enable Amazon EBS Multi-Attach. Multi-Attach is supported exclusively on io1 volumes.

outpost_arn str

The Amazon Resource Name (ARN) of the Outpost.

size float

The size of the drive in GiBs.

snapshot_id str

A snapshot to base the EBS volume off of.

tags Dict[str, str]

A map of tags to assign to the resource.

type str

The type of EBS volume. Can be “standard”, “gp2”, “io1”, “sc1” or “st1” (Default: “gp2”).

Package Details

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