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=v1.0.2"
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_zone
– Required. 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_gb
– Required. The size of the EBS volume in gigabytes. -
type
– Optional. 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. -
iops
– Optional. The number of I/O Operations Per Second (IOS) to provision for the disk. -
encrypted
– Optional. Defaults tofalse.
If set totrue
, this enables encryption at rest for the EBS volume. -
kms_key_id
– Optional. The Amazon Resource Name (ARN) for an AWS Key Management Service (KMS) key to use whenencrypted
is set totrue
.
Outputs
ebs_volumes.aws_ebs_volume.ebs_volume
– This is the underlyingaws_ebs_volume
resource.