Description
Is your request related to a new offering from AWS?
No
Is your request related to a problem? Please describe.
The creation of an aws_ebs_volume
resource linked to an EC2 requires the instance's availability zone. To this end, the user can set the module's availability_zone
input and reuse its value when creating the volume.
However, there are limitations on the number of instances that can be launched in each availability zone. It would be convenient to be able to have the availability zone be randomly assigned by the provider when creating an instance, rather than having to declare it manually.
Describe the solution you'd like.
Add an output block for the availability_zone
attribute of the created aws_instance
resource.
Describe alternatives you've considered.
Create a map of the different availability zones for the desired region and add a random_shuffle
resource block to randomly assign an AZ to each instance.
Additional context
The alternative would be unnecessarily bulky and unreliable, when a simple output block could solve the problem.
This issue is a throwback to #264, and the desired change is exactly that being made by PR #265 from over a year ago, that has been marked as stale and closed without any discussion. If possible, I would appreciate if this PR could be reopened and merged.