resource/aws_route: Support changing network_interface_id #2353
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.
network_interface_id
andinstance_id
are both optional and computed. If you specify one, the other is computed byresourceAwsRouteSetResourceData
.hashicorp/terraform#7686 made it so that if you specified
instance_id
, applied, changed theinstance_id
, and applied again, we would ignore the computednetwork_interface_id
(an ENI on the old instance) and update theinstance_id
correctly. This broke the opposite case (specifynetwork_interface_id
, apply, change, apply again).This PR checks which has changed instead of preferring one over the other, fixing #2270. It depends on hashicorp/terraform#16693.