New Rsource: azurerm_virtual_machine_scale_set_managed_disk - #32715
Draft
ziyeqf wants to merge 13 commits into
Draft
New Rsource: azurerm_virtual_machine_scale_set_managed_disk#32715ziyeqf wants to merge 13 commits into
azurerm_virtual_machine_scale_set_managed_disk#32715ziyeqf wants to merge 13 commits into
Conversation
Collaborator
Author
|
/test -b |
There was a problem hiding this comment.
Pull request overview
This PR introduces a new Terraform resource (azurerm_virtual_machine_scale_set_managed_disk) intended to manage Azure Managed Disks that may be attached to Virtual Machine Scale Set (VMSS) instances, enabling updates that would otherwise fail with azurerm_managed_disk when a disk is attached to a VMSS VM.
Changes:
- Adds the new
azurerm_virtual_machine_scale_set_managed_diskresource implementation, including hot-detach/update/reattach logic for VMSS instance-attached disks. - Adds a corresponding list resource implementation and acceptance tests (including identity + “attached to VMSS instance” behavior coverage).
- Adds docs + name validation helper for Managed Disk names and updates issue triage labeler patterns.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| website/docs/r/virtual_machine_scale_set_managed_disk.html.markdown | New resource documentation for VMSS-managed disk behavior and arguments. |
| website/docs/list-resources/virtual_machine_scale_set_managed_disk.html.markdown | Adds list-resource documentation for the new resource type. |
| internal/services/compute/virtual_machine_scale_set_managed_disk_resource.go | Core resource implementation, including update-with-detach workflow. |
| internal/services/compute/virtual_machine_scale_set_managed_disk_resource_test.go | Acceptance tests for basic/complete/update/validation behaviors. |
| internal/services/compute/virtual_machine_scale_set_managed_disk_resource_list.go | List resource implementation for enumerating disks. |
| internal/services/compute/virtual_machine_scale_set_managed_disk_resource_list_test.go | Acceptance test coverage for list/query behavior. |
| internal/services/compute/virtual_machine_scale_set_managed_disk_resource_identity_gen_test.go | Generated acceptance test validating resource identity fields. |
| internal/services/compute/virtual_machine_scale_set_managed_disk_attached_resource_test.go | Acceptance test proving hot-detach/update/reattach behavior when attached to a VMSS instance. |
| internal/services/compute/validate/managed_disk_name.go | Adds Managed Disk name validation helper. |
| internal/services/compute/validate/managed_disk_name_test.go | Unit tests for Managed Disk name validation. |
| internal/services/compute/resource_names.go | Adds VirtualMachineScaleSetResourceName constant used for locking. |
| internal/services/compute/registration.go | Registers the new resource and list resource with the compute service. |
| .github/labeler-issue-triage.yml | Updates issue triage labeler to recognize the new resource name. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Collaborator
Author
|
/test -b |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Collaborator
Author
|
/test -b |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Collaborator
Author
|
/test -b |
Collaborator
|
Total: 11 Test Details
|
Collaborator
|
Testing in Beta version enabled Total: 12 Test Details
|
Collaborator
Author
|
/test TeamCity build triggered:
|
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
add a new managed disk resource to support managed disk attached to VMSS.
The existing resource
azurerm_managed_diskby design does not support disk attached to a VMSS. e.g.: some properties requires the disk to be detached when it's attached to VMSS, but requires restart when it's attached to a VM. accroding to the comment #25582 (comment), adding a new resource instead of implementing this kind of logic in the existing resource.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_virtual_machine_scale_set_managed_disk[GH-00000]This is a (please select all that apply):
Related Issue(s)
Fixes #26651
Fixes #14617
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.