Skip to main content Link Menu Expand (external link) Document Search Copy Copied

ebs_volumes

Description

The Provose ebs_volumes module configures Elastic Block Storage (EBS) volumes that exist independently of any EC2 instance or ECS container.

Containers and EC2 instances come with their own root volumes, but those volumes will not persist of the container or instance are destroyed and recreated. The ebs_volumes module is a great way to set up filesystems that will continue to exist even when the EC2 instance mounting the filesystem is destroyed.

Examples

Creating two EBS volumes in different availability zones.

module "myproject" {
  source = "github.com/provose/provose?ref=v3.0.0"
  provose_config = {
    authentication = {
      aws = {
        region = "us-east-1"
      }
    }
    name                 = "myproject"
    internal_root_domain = "example-internal.com"
    internal_subdomain   = "production"
  }
  ebs_volumes = {
    some_volume = {
      availability_zone = "us-east-1c"
      size_gb           = 100
    }
    provisioned_volume = {
      availability_zone = "us-east-1a"
      size_gb           = 50
      iops              = 2500
      type              = "io1"
      encrypted         = true
    }
  }
}

Inputs

  • availability_zoneRequired. The AWS availability zone to place the EBS volume. Keep in mind that the EC2 instance that mounts this EBS volume must be in the same availability zone.

  • size_gbRequired. The size of the EBS volume in gigabytes.

  • typeOptional. The type of the EBS volume. This defaults to "gp2", but can also be "standard", "io1", "sc1", or "st1". The AWS documentation describes in detail what the different EBS volume types mean.

  • iopsOptional. The number of I/O Operations Per Second (IOS) to provision for the disk.

  • encryptedOptional. Defaults to false. If set to true, this enables encryption at rest for the EBS volume.

  • kms_key_idOptional. The Amazon Resource Name (ARN) for an AWS Key Management Service (KMS) key to use when encrypted is set to true.

Outputs