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

feat: Optionally use aws_ebs_volume resource #232

Closed ehassett closed 2 years ago

ehassett commented 3 years ago

Description

This PR aims to enable the optional use of aws_ebs_volume and aws_volume_attachment resources as opposed to the inline ebs_block_device dynamic block. It improves upon similar open PRs (#186 and #140) in the following ways:

Motivation and Context

This PR solves limitations prevented by using an inline EBS block in the aws_instance resource.

Breaking Changes

N/A

How Has This Been Tested?

Tested with the complete example by adding use_ebs_volume_resource = true to the inputs.

antonbabenko commented 3 years ago

@ethanhassett Could you please rebase it? We have released v3.0.0 a few hours ago where some of your code should be updated.

ehassett commented 3 years ago

Accidentally closed this PR with a force-push, reworking the code for v3.0 and will update soon.

ehassett commented 3 years ago

PR updated with changes for 3.0 as there is no longer instace_count support. This has been tested with module.ec2_complete_ebs_volume_resource that I've added to examples/complete/main.tf

github-actions[bot] commented 2 years ago

This PR has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this PR will be closed in 10 days

github-actions[bot] commented 2 years ago

This PR was automatically closed because of stale in 10 days

github-actions[bot] commented 2 years ago

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.