always allow computed-only changes in the plan #31509
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.
Allow the provider to plan any compatible value for computed-only attributes. We currently fail here if there's an apparent config value at this point and the provider set a new computed value.
We don't need to check the config for null here, because under normal circumstances there should never be a config value for a computed-only attribute in the first place. There however could be 2 reasons we find one at this point:
ignore_changes
on a computed attribute and ignored the warning, causing us to insert the prior state value into the plan-time config. This unfortunately is only a warning to prevent breaking configs which are currently working with legacy providers.Neither of these cases constitute an error in the plan created by the provider, so we can let it pass the
AssertPlanValid
test. Legacy providers avoided this error because they have theignore_changes
re-applied after the plan for backwards compatibility.