feat: Add instance IPv6 addresses to the outputs #249
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Added an output for the
ipv6_addresses
of the AWS instances, similar to bothpublic_ip
andprivate_ip
.Motivation and Context
Motivation is the same as #241 . In particular, relying on
aws_instance
data source overly complicates working with IPv6 if usingcount
orfor_each
in the module, having to split apply into 2 steps: one targeted for this module's instances, another one for the rest of the stuff, as you can't use a dynamicfor_each
in a data source:This is particular handy when the subnet the instance is placed in assigns IPv6 addresses at creation time, as neither
ipv6_addresses
oripv6_addresses_count
are required to be set in that case to get an IPv6 address.Do note that
aws_spot_instance_request
resource doesn't offer a similar attribute, hence it isn't covered in this PR.Breaking Changes
How Has This Been Tested?
examples/*
projects