azurerm_site_recovery_replicated_vm - remove ForceNew from managed_disk disk type fields#32158
Open
ziyeqf wants to merge 24 commits into
Open
azurerm_site_recovery_replicated_vm - remove ForceNew from managed_disk disk type fields#32158ziyeqf wants to merge 24 commits into
azurerm_site_recovery_replicated_vm - remove ForceNew from managed_disk disk type fields#32158ziyeqf wants to merge 24 commits into
Conversation
…rom `managed_disk` disk type fields
Draft
15 tasks
This reverts commit 5f4cd6e.
613c496 to
972469f
Compare
gerrytan
suggested changes
Jun 25, 2026
| } | ||
|
|
||
| for _, field := range []string{"staging_storage_account_id", "target_resource_group_id", "target_disk_encryption_set_id"} { | ||
| if siteRecoveryReplicatedVMManagedDiskValue(oldDisk, field) != siteRecoveryReplicatedVMManagedDiskValue(newDisk, field) { |
Collaborator
There was a problem hiding this comment.
Should this comparison be case-insensitive too since you added DiffSuppressFunc: suppress.CaseDifference, to the schema above?
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
teowa
approved these changes
Jun 26, 2026
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Collaborator
|
@ziyeqf - One or more tests failed in this PR. Please review the failures. Total: 16 Test Details
|
Collaborator
|
@ziyeqf - One or more tests failed in this PR. Please review the failures. Testing in Beta version enabled Total: 16 Test Details
|
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.
Community Note
Description
The Azure REST API supports in-place updates to these fields via
A2AVMManagedDiskUpdateDetails, and the provider's Update function already constructs the correct update payloads.Thus we can remove the
ForceNewfrommanaged_diskanddisk_typeChanging the
managed_diskfrom TypeSet to TypeList, because previously, we only usedisk_idto generate the hash ofmanaged_disk, however, to allow in-place update fortarget_disk_typewe have to include these in the hash function of thismanaged_diskblock, otherwise changes ontarget_disk_typewill be droped.In that case, at creation, the disk_id is unknown, then the
managed_diskwill become computed, sod.Get()cannot read the value of it, which will cause the creaton fails.So changing it to a ordered list (since the service does not gurantee the order) makes it clear.
PR Checklist
For example: “
resource_name_here- description of change e.g. adding propertynew_property_name_here”Changes to existing Resource / Data Source
Testing
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_site_recovery_replicated_vm- removeForceNewfrommanaged_diskdisk type fields [GH-00000]This is a (please select all that apply):
Related Issue(s)
Fixes #0000
AI Assistance Disclosure
Rollback Plan
If a change needs to be reverted, we will publish an updated version of the provider.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
Note
If this PR changes meaningfully during the course of review please update the title and description as required.