aws_instance
: fix ipv6_addresses
/ ipv6_addresses_count
refresh
#43158
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.
Rollback Plan
If a change needs to be reverted, we will publish an updated version of the library.
Changes to Security Controls
No changes
Description
Updates
aws_instance
so thatipv6_addresses
are recomputed whenipv6_address_count
is updated.In order to achieve this, I needed to remove
ForceNew
fromipv6_addresses
, but reimplemented the functionality viacustomdiff.ForceNewIf
.The
TestAccEC2Instance_IPv6AddressesExplicit
test may be overkill -- since the instance is recreated whenipv6_addresses
is explicitly changed,ipv6_address_count
should inherently be recomputed since it's a new instance. I introduced it anyways, to make sure that thecustomdiff.ForceNewIf
did what I was expecting.I also updated the name of the
TestAccEC2Instance_IPv6AddressCountAndSingleAddressCausesError
test function in order to make it more convenient to run withTESTS=TestAccEC2Instance_IPv6
.Relations
Closes #43009
Output from Acceptance Testing