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
754 stars 1.87k forks source link

Add `availability_zone` output #264

Closed kennedy closed 2 years ago

kennedy commented 2 years ago

Is your request related to a new offering from AWS?

No

Is your request related to a problem? Please describe.

When trying to create additional EBS volumes, it requires the availability_zone. The EC2 module is not outputting the AZ of itself to use as reference.

Describe the solution you'd like.

It would be very helpful to get the EC2 instance's availability_zone in the output as reference.

Describe alternatives you've considered.

Would need to create a data.aws_instance resource using the module.ec2-instance.id for the availability_zone information.

Additional context

If the data.aws_instance resource has a for_each/count loop on the module, it would have an error indicating your would need to apply the module first.

github-actions[bot] commented 2 years ago

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

github-actions[bot] commented 2 years ago

This issue was automatically closed because of stale in 10 days

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.