terraform-aws-modules / terraform-aws-ec2-instance

Terraform module to create AWS EC2 instance(s) resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/ec2-instance/aws
Apache License 2.0
758 stars 1.88k forks source link

Question: Change size of volumes getting attached when launching EC2 using an AMI that has multiple volumes #363

Closed lnkrishnan closed 1 year ago

lnkrishnan commented 1 year ago

We have a use-case where the AMI prepped by our team has multiple volumes created with varying sizes to satisfy CIS-Compliant Partition sizing requirements.

When spinning up via the EC2 console we get the option to set the volume sizes appropriately as/if required.

Is this possible with terraform and this EC2 module? I tried poking around with creating volumes and attachments based on the example, but as expected, the EC2 service fails saying that there is already a volume at the specified mount point (automatically attached as part of spinning up the EC2 via the module).

lnkrishnan commented 1 year ago

@antonbabenko not sure about the rules regarding @-ing folks on here (so pls pardon if I am out of line here), but was wondering if you could take a look at this and comment, when you can? Thanks

bryantbiggs commented 1 year ago

this is up to the AWS EC2 API behavior - I would suggest looking at the EC2 docs and specifically its API to see if this behavior is supported

github-actions[bot] commented 1 year ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.