automation: split automation_module CreateUpdate into separate Create and Update#31952
Merged
automation: split automation_module CreateUpdate into separate Create and Update#31952
Conversation
… and Update Split resourceAutomationModuleCreateUpdate into independent resourceAutomationModuleCreate and resourceAutomationModuleUpdate functions. Create function: - Uses timeouts.ForCreate - Unwraps d.IsNewResource() guard, keeps isGlobal existence check - Uses CreateOrUpdate API - State waiter uses TimeoutCreate - Error message says 'creating' Update function: - Uses timeouts.ForUpdate - Parses ID from d.Id() - Uses PATCH API (ModuleUpdateParameters) instead of PUT - HasChange guard for module_link - State waiter uses TimeoutUpdate - Error message says 'updating' - No d.SetId() call
d30d714 to
9ebaacd
Compare
mbfrahry
requested changes
Mar 16, 2026
Member
mbfrahry
left a comment
There was a problem hiding this comment.
Minor comment but looks good otherwise
|
|
||
| // the API returns 'done' but it's not actually finished provisioning yet | ||
| // tracking issue: https://github.com/Azure/azure-rest-api-specs/pull/25435 | ||
| stateConf := &pluginsdk.StateChangeConf{ |
Member
There was a problem hiding this comment.
Can we put this block and the create block of this code into a function since it looks to be mostly copy paste outside of the timeout
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.
No description provided.