Fix: Solution settings checksum final plan inconsistency#1140
Draft
AdamCoulterOz wants to merge 2 commits intomicrosoft:mainfrom
Draft
Fix: Solution settings checksum final plan inconsistency#1140AdamCoulterOz wants to merge 2 commits intomicrosoft:mainfrom
AdamCoulterOz wants to merge 2 commits intomicrosoft:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed
settings_file_checksumduring planning when the resource has no prior stateWhy it changed
powerplatform_solution.settings_file_checksumwas being derived from the on-disk file during planning, even on create.When
settings_filepoints to a generated file that is created or updated earlier in the same apply, Terraform can plan against stale file contents and then apply against different contents. That causes Terraform to fail with an inconsistent final plan.Impact
This fixes create-time plan/apply divergence for
powerplatform_solutionresources whosesettings_fileis produced dynamically during the same Terraform apply.Fixes #1138.
Validation
go test ./internal/modifiers ./internal/services/solutionmake precommitwas run and currently fails on existing repo-wide lint findings already present outside this PRChecklist
dto.go: not applicable, this fix does not change DTOsmodel.go: not applicable, this fix does not change the resource modelapi_{name}.go: not applicable, this fix does not change API client behaviorresource_{name}.go: not applicable, the bug is in the shared plan modifier used by the resource schemainternal/modifiers/sync_attribute_plan_modifier_test.gointernal/services/solution/resource_solution_test.go; no new acceptance test was added for this shared modifier fixprovider.goandprovider_test.go: not applicable, no provider registration changes/examples: not applicable, no user-facing configuration shape changedMarkdownDescription: not applicable, schema docs did not need changesfixedunreleased changie fragment for#1138make precommit: executed; blocked by existing lint issues outside this PR