Azure / terraform-azurerm-avm-res-compute-virtualmachine

Terraform AVM module for virtual machines
MIT License
17 stars 26 forks source link

[AVM Module Issue]: Unsupported argument error for disk_controller_type #77

Closed zlatif99 closed 4 months ago

zlatif99 commented 5 months ago

Check for previous/existing GitHub issues

Issue Type?

Bug

(Optional) Module Version

0.13.1

(Optional) Correlation Id

No response

Description

While attempting to deploy a VM, I am seeing the below error when terraform plan runs preventing the VM from being deployed. I'm not using disk_controller_type and believe something in the module may be causing this

│ Error: Unsupported argument
│ 
│   on .terraform\modules\avm-res-compute-virtualmachine\main.linux_vm.tf line 22, in resource "azurerm_linux_virtual_machine" "this":
│   22:   disk_controller_type                                   = var.disk_controller_type
│ 
│ An argument named "disk_controller_type" is not expected here.
╵
╷
│ Error: Unsupported argument
│ 
│   on .terraform\modules\avm-res-compute-virtualmachine\main.windows_vm.tf line 21, in resource "azurerm_windows_virtual_machine" "this":
│   21:   disk_controller_type                                   = var.disk_controller_type
│ 
│ An argument named "disk_controller_type" is not expected here.
jchancellor-ms commented 5 months ago

@zlatif99 - Thanks for reporting this bug. I'll validate the module to ensure that nothing has changed on the API or the module and report back with an update or fix.

jchancellor-ms commented 5 months ago

@zlatif99 - I believe this was a miss on my part to ensure the minimum level of the azureRM provider. Since this feature was released recently, I missed setting the minimum provider level required to support this feature. I'll do a bug fix to correct this, but if you wish to use the module immediately, you should be able to do a terraform init -upgrade to go to the latest version of the azureRM provider. The one caveat here is that if the calling module has a conflicting constraint then it may prevent you from going to the latest version of AzureRM.

zlatif99 commented 5 months ago

@jchancellor-ms - Np, thank you for checking this out. I was able to deploy using another method so happy to wait for when the fix is done.

jchancellor-ms commented 4 months ago

@zlatif99 - I've updated the minimum required version for AzureRM to 3.105 as part of the 0.14 release. Please feel free to test using 0.14 and let me know if you still encounter the disks issue.

jchancellor-ms commented 4 months ago

Closing this issue. Please re-open if the problem still exists.