Files
opentf/website/source/docs/providers/aws/r/ebs_volume.html.md
Borgstrom ♕ 2195a67748 Ensure kms_key_id docs indicate it is an ARN (#7842)
If you specify just a bare ID, then the initial application works but
subsequent applications may end up doing bad things, like:

```
-/+ aws_ebs_volume.vol_1
    availability_zone: "us-east-1a" => "us-east-1a"
    encrypted:         "true" => "true"
    iops:              "" => "<computed>"
    kms_key_id:        "arn:aws:kms:us-east-1:123456789:key/59faf88b-0912-4cca-8b6c-bd107a6ba8c4" => "59faf88b-0912-4cca-8b6c-bd107a6ba8c4" (forces new resource)
    size:              "100" => "100"
    snapshot_id:       "" => "<computed>"
```
2016-07-28 08:44:09 +01:00

1.4 KiB

layout, page_title, sidebar_current, description
layout page_title sidebar_current description
aws AWS: aws_ebs_volume docs-aws-resource-ebs-volume Provides an elastic block storage resource.

aws_ebs_volume

Manages a single EBS volume.

Example Usage

resource "aws_ebs_volume" "example" {
    availability_zone = "us-west-2a"
    size = 40
    tags {
        Name = "HelloWorld"
    }
}

~> NOTE: One of size or snapshot_id is required when specifying an EBS volume

Argument Reference

The following arguments are supported:

  • availability_zone - (Required) The AZ where the EBS volume will exist.
  • encrypted - (Optional) If true, the disk will be encrypted.
  • iops - (Optional) The amount of IOPS to provision for the disk.
  • size - (Optional) The size of the drive in GB.
  • snapshot_id (Optional) A snapshot to base the EBS volume off of.
  • type - (Optional) The type of EBS volume. Can be "standard", "gp2", "io1", or "st1" (Default: "standard").
  • kms_key_id - (Optional) The ARN for the KMS encryption key. When specifying kms_key_id, encrypted needs to be set to true
  • tags - (Optional) A mapping of tags to assign to the resource.

Attributes Reference

The following attributes are exported:

  • id - The volume ID (e.g. vol-59fcb34e).

Import

EBS Volumes can be imported using the id, e.g.

$ terraform import aws_ebs_volume.data vol-049df61146c4d7901