github.com/crossplane/upjet@v1.3.0/pkg/registry/testdata/aws/r/ebs_volume.html.markdown (about)

     1  <!--
     2  SPDX-FileCopyrightText: 2023 The Crossplane Authors <https://crossplane.io>
     3  
     4  SPDX-License-Identifier: Apache-2.0
     5  -->
     6  
     7  ---
     8  
     9  subcategory: "EBS (EC2)"
    10  layout: "aws"
    11  page_title: "AWS: aws_ebs_volume"
    12  description: |-
    13    Provides an elastic block storage resource.
    14  ---
    15  
    16  # Resource: aws_ebs_volume
    17  
    18  Manages a single EBS volume.
    19  
    20  ## Example Usage
    21  
    22  ```terraform
    23  resource "aws_ebs_volume" "example" {
    24    availability_zone = "us-west-2a"
    25    size              = 40
    26  
    27    tags = {
    28      Name = "HelloWorld"
    29    }
    30  }
    31  ```
    32  
    33  ~> **NOTE**: At least one of `size` or `snapshot_id` is required when specifying an EBS volume
    34  
    35  ## Argument Reference
    36  
    37  The following arguments are supported:
    38  
    39  * `availability_zone` - (Required) The AZ where the EBS volume will exist.
    40  * `encrypted` - (Optional) If true, the disk will be encrypted.
    41  * `iops` - (Optional) The amount of IOPS to provision for the disk. Only valid for `type` of `io1`, `io2` or `gp3`.
    42  * `multi_attach_enabled` - (Optional) Specifies whether to enable Amazon EBS Multi-Attach. Multi-Attach is supported on `io1` and `io2` volumes.
    43  * `size` - (Optional) The size of the drive in GiBs.
    44  * `snapshot_id` (Optional) A snapshot to base the EBS volume off of.
    45  * `outpost_arn` - (Optional) The Amazon Resource Name (ARN) of the Outpost.
    46  * `type` - (Optional) The type of EBS volume. Can be `standard`, `gp2`, `gp3`, `io1`, `io2`, `sc1` or `st1` (Default: `gp2`).
    47  * `kms_key_id` - (Optional) The ARN for the KMS encryption key. When specifying `kms_key_id`, `encrypted` needs to be set to true. Note: Terraform must be running with credentials which have the `GenerateDataKeyWithoutPlaintext` permission on the specified KMS key as required by the [EBS KMS CMK volume provisioning process](https://docs.aws.amazon.com/kms/latest/developerguide/services-ebs.html#ebs-cmk) to prevent a volume from being created and almost immediately deleted.
    48  * `tags` - (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level.
    49  * `throughput` - (Optional) The throughput that the volume supports, in MiB/s. Only valid for `type` of `gp3`.
    50  
    51  ~> **NOTE**: When changing the `size`, `iops` or `type` of an instance, there are [considerations](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/considerations.html) to be aware of.
    52  
    53  ## Attributes Reference
    54  
    55  In addition to all arguments above, the following attributes are exported:
    56  
    57  * `id` - The volume ID (e.g., vol-59fcb34e).
    58  * `arn` - The volume ARN (e.g., arn:aws:ec2:us-east-1:0123456789012:volume/vol-59fcb34e).
    59  * `tags_all` - A map of tags assigned to the resource, including those inherited from the provider [`default_tags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block).
    60  
    61  ## Timeouts
    62  
    63  `aws_ebs_volume` provides the following [Timeouts](https://www.terraform.io/docs/configuration/blocks/resources/syntax.html#operation-timeouts) configuration options:
    64  
    65  * `create` - (Default `5 minutes`) Used for creating volumes. This includes the time required for the volume to become available
    66  * `update` - (Default `5 minutes`) Used for `size`, `type`, or `iops` volume changes
    67  * `delete` - (Default `5 minutes`) Used for destroying volumes
    68  
    69  ## Import
    70  
    71  EBS Volumes can be imported using the `id`, e.g.,
    72  
    73  ```
    74  terraform import aws_ebs_volume.id vol-049df61146c4d7901
    75  ```