github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/website/source/docs/providers/aws/r/ebs_volume.html.md (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_ebs_volume" 4 sidebar_current: "docs-aws-resource-ebs-volume" 5 description: |- 6 Provides an elastic block storage resource. 7 --- 8 9 # aws\_ebs\_volume 10 11 Manages a single EBS volume. 12 13 ## Example Usage 14 15 ``` 16 resource "aws_ebs_volume" "example" { 17 availability_zone = "us-west-2a" 18 size = 40 19 tags { 20 Name = "HelloWorld" 21 } 22 } 23 ``` 24 25 ~> **NOTE**: One of `size` or `snapshot_id` is required when specifying an EBS volume 26 27 ## Argument Reference 28 29 The following arguments are supported: 30 31 * `availability_zone` - (Required) The AZ where the EBS volume will exist. 32 * `encrypted` - (Optional) If true, the disk will be encrypted. 33 * `iops` - (Optional) The amount of IOPS to provision for the disk. 34 * `size` - (Optional) The size of the drive in GiBs. 35 * `snapshot_id` (Optional) A snapshot to base the EBS volume off of. 36 * `type` - (Optional) The type of EBS volume. Can be "standard", "gp2", "io1", "sc1" or "st1" (Default: "standard"). 37 * `kms_key_id` - (Optional) The ARN for the KMS encryption key. When specifying `kms_key_id`, `encrypted` needs to be set to true. 38 * `tags` - (Optional) A mapping of tags to assign to the resource. 39 40 ## Attributes Reference 41 42 The following attributes are exported: 43 44 * `id` - The volume ID (e.g. vol-59fcb34e). 45 46 47 ## Import 48 49 EBS Volumes can be imported using the `id`, e.g. 50 51 ``` 52 $ terraform import aws_ebs_volume.data vol-049df61146c4d7901 53 ```