fix: registeredDomain failing on repeated contact_id updates#325
Open
alexhuk3 wants to merge 2 commits into
Open
fix: registeredDomain failing on repeated contact_id updates#325alexhuk3 wants to merge 2 commits into
alexhuk3 wants to merge 2 commits into
Conversation
DXTimer
requested changes
Jan 29, 2026
Contributor
DXTimer
left a comment
There was a problem hiding this comment.
Thank you for the contribution.
Would you mind adding a test case that covers the described scenario? This would help us guard against regressions going forward.
519dd50 to
33e950f
Compare
Add TestAccRegisteredDomainResource_RepeatedRegistrantChange to cover the scenario where contact_id is updated multiple times. Previously, the second update would fail with 'unexpected unknown property value for registrantChange'. Also fix misleading comment in update.go about createRegistrantChange being called unconditionally after convergence. Signed-off-by: Maksim Ryzhukhin <eumaxpl@gmail.com>
33e950f to
12aff59
Compare
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
Fixes an issue where updating
contact_idon adnsimple_registered_domainsucceeds on the initial change,but fails on subsequent updates with:
Why
When a domain’s registrant contact is changed for the first time, the update completes successfully and a
registrantChangeobject is persisted in state.On subsequent
contact_idupdates, the provider may encounter an unknown value for theregistrantChangeattribute during planning, which causes the update to fail.This happens because:
registrant_changeobject did not preserve its prior state when its value was unknown during planningRequiresReplace()despite representing historicalregistrant change data rather than the domain itself
This prevents repeated registrant contact changes from being applied reliably.
How
schema.go
objectplanmodifier.UseStateForUnknown()to theregistrant_changeattribute to preserve the state value during planningRequiresReplace()fromcontact_idanddomain_idnested attributesRequiresReplaceIfConfigured()fromextended_attributesupdate.go
contact_iddiffers, even if a previous change exists in a completed state