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:
- Availability
Zone 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.
- Kms
Key stringId The ARN for the KMS encryption key. When specifying
kms_key_id,encryptedneeds to be set to true.- Multi
Attach boolEnabled Specifies whether to enable Amazon EBS Multi-Attach. Multi-Attach is supported exclusively on
io1volumes.- Outpost
Arn string The Amazon Resource Name (ARN) of the Outpost.
- Size int
The size of the drive in GiBs.
- Snapshot
Id string A snapshot to base the EBS volume off of.
- 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”).
- Availability
Zone 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.
- Kms
Key stringId The ARN for the KMS encryption key. When specifying
kms_key_id,encryptedneeds to be set to true.- Multi
Attach boolEnabled Specifies whether to enable Amazon EBS Multi-Attach. Multi-Attach is supported exclusively on
io1volumes.- Outpost
Arn string The Amazon Resource Name (ARN) of the Outpost.
- Size int
The size of the drive in GiBs.
- Snapshot
Id string A snapshot to base the EBS volume off of.
- 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”).
- availability
Zone 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.
- kms
Key stringId The ARN for the KMS encryption key. When specifying
kms_key_id,encryptedneeds to be set to true.- multi
Attach booleanEnabled Specifies whether to enable Amazon EBS Multi-Attach. Multi-Attach is supported exclusively on
io1volumes.- outpost
Arn string The Amazon Resource Name (ARN) of the Outpost.
- size number
The size of the drive in GiBs.
- snapshot
Id string A snapshot to base the EBS volume off of.
- {[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_ strid The ARN for the KMS encryption key. When specifying
kms_key_id,encryptedneeds to be set to true.- multi_
attach_ boolenabled Specifies whether to enable Amazon EBS Multi-Attach. Multi-Attach is supported exclusively on
io1volumes.- 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.
- 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:
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): Volumestatic 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).
- Availability
Zone 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.
- Kms
Key stringId The ARN for the KMS encryption key. When specifying
kms_key_id,encryptedneeds to be set to true.- Multi
Attach boolEnabled Specifies whether to enable Amazon EBS Multi-Attach. Multi-Attach is supported exclusively on
io1volumes.- Outpost
Arn string The Amazon Resource Name (ARN) of the Outpost.
- Size int
The size of the drive in GiBs.
- Snapshot
Id string A snapshot to base the EBS volume off of.
- 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).
- Availability
Zone 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.
- Kms
Key stringId The ARN for the KMS encryption key. When specifying
kms_key_id,encryptedneeds to be set to true.- Multi
Attach boolEnabled Specifies whether to enable Amazon EBS Multi-Attach. Multi-Attach is supported exclusively on
io1volumes.- Outpost
Arn string The Amazon Resource Name (ARN) of the Outpost.
- Size int
The size of the drive in GiBs.
- Snapshot
Id string A snapshot to base the EBS volume off of.
- 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).
- availability
Zone 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.
- kms
Key stringId The ARN for the KMS encryption key. When specifying
kms_key_id,encryptedneeds to be set to true.- multi
Attach booleanEnabled Specifies whether to enable Amazon EBS Multi-Attach. Multi-Attach is supported exclusively on
io1volumes.- outpost
Arn string The Amazon Resource Name (ARN) of the Outpost.
- size number
The size of the drive in GiBs.
- snapshot
Id string A snapshot to base the EBS volume off of.
- {[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_ strid The ARN for the KMS encryption key. When specifying
kms_key_id,encryptedneeds to be set to true.- multi_
attach_ boolenabled Specifies whether to enable Amazon EBS Multi-Attach. Multi-Attach is supported exclusively on
io1volumes.- 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.
- 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
awsTerraform Provider.