Repository navigation
[EMS-22255] Add disk_controller_type support to virtual_machine_default - #126
Open
lyudmililchev92 wants to merge 1 commit into
Open
lyudmililchev92 wants to merge 1 commit into
lyudmililchev92 wants to merge 1 commit into
Conversation
azurerm_virtual_machine is feature-frozen and cannot set the disk controller type, which blocks resizing to NVMe-only sizes (e.g. Easv6). Set the controller together with the size through azapi_update_resource, applied before azurerm_virtual_machine.main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Allows switching the disk controller (SCSI ↔ NVMe) of VMs managed by the
defaulttype (azurerm_virtual_machine). This is required to resize existing VMs to NVMe-only sizes such asEasv6.azurerm_virtual_machineis feature-frozen in the AzureRM provider and has nodisk_controller_typeargument. Azure only allows changing the controller in the same request as a size change.Changes
disk_controller_type("NVMe"/"SCSI") fortype = "default"VMs.azapi_update_resourcesendsvmSize+diskControllerTypein one request.azurerm_virtual_machine.mainnowdepends_onthat resource, so the azapi update runs first. The azurerm update that follows only applies the size that is already set.disk_controller_typethe azapi resource hascount = 0.Usage
Notes
depends_on, so on create the azapi update would run before the VM exists. For new VMs Azure picks the controller from the size, so the setting is not needed.stornvme) must be set to boot start in Windows before applying. Otherwise the VM will not boot.dca-test-col-app,dca-test-col-db), with aterraform planreview before apply.🤖 Generated with Claude Code