HPR-1177: Assigned iteration should not be forced to be null when no iteration block is present #521
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
Previously, when no iteration block existed on
hcp_packer_channel
, the provider would treat external management of the channel's iteration assignment as configuration drift and the assignment would be removed on next apply. Now, the channel's assigned iteration is ignored when there is no iteration block present. In use cases where users may want to force a channel to have no assigned iteration, they can use a zero value for one of the attributes in the iteration block.Additionally, these changes enhance plans by populating the 2 unset iteration block attributes with the data associated with the 1 set attribute. This improves visibility in cases where the iteration associated with the chosen attribute may change due to external modifications (ex: deletion of an iteration with fingerprint
xyz
and then uploading another iteration with the fingerprint manually set toxyz
, or deleting the latest complete iteration assigned version7
and then uploading a new complete iteration which will then be automatically assigned version7
). In cases where the 1 set attribute is not associated with any iteration, these changes move failure up the chain from apply-time to plan-time.🏗️ Acceptance tests
Output from acceptance testing: