rror: creating Linux Virtual Machine Scale Set: (Name "xyz" / Resource Group "xyz"): compute.VirtualMachineScaleSetsClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="InvalidParameter" Message="Parameter 'dataDisk.name' is not allowed." Target="dataDisk.name"
│
│ with module.vmss.azurerm_linux_virtual_machine_scale_set.vmss,
│ on .terraform/modules/vmss/main.tf line 13, in resource "azurerm_linux_virtual_machine_scale_set" "vmss":
│ 13: resource "azurerm_linux_virtual_machine_scale_set" "vmss" {
│
╵
##[error]Bash exited with code '1'.
##[error]Bash wrote one or more lines to the standard error stream.
##[error]╷
│ Error: creating Linux Virtual Machine Scale Set: (Name "xyz" / Resource Group "xyz"): compute.VirtualMachineScaleSetsClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="InvalidParameter" Message="Parameter 'dataDisk.name' is not allowed." Target="dataDisk.name"
│
│ with module.vmss.azurerm_linux_virtual_machine_scale_set.vmss,
│ on .terraform/modules/vmss/main.tf line 13, in resource "azurerm_linux_virtual_machine_scale_set" "vmss":
│ 13: resource "azurerm_linux_virtual_machine_scale_set" "vmss" {
Expected Behaviour
VMSS should be deployed along with datadisk names as we supplied
Actual Behaviour
When supplying datadisk name in data_disk block, it fails with above error. However, when done without name, it works
data_disk {
name = var.data_disk_name
caching = var.data_disk_caching
create_option = var.create_option
disk_size_gb = var.data_disk_disk_size_gb
lun = var.data_disk_lun
storage_account_type = var.data_disk_storage_account_type
disk_encryption_set_id = var.disk_encryption_set_id
write_accelerator_enabled = var.data_disk_write_accelerator_enabled
}
Thanks for opening this issue. Have you been able to try this on any of the more recent 3.x versions or on the new 4.x versions to see if this issue still persists?
Is there an existing issue for this?
Community Note
Terraform Version
1.3.1
AzureRM Provider Version
3.25
Affected Resource(s)/Data Source(s)
azurerm_azurerm_linux_virtual_machine_scale_set
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
VMSS should be deployed along with datadisk names as we supplied
Actual Behaviour
When supplying datadisk name in data_disk block, it fails with above error. However, when done without name, it works data_disk { name = var.data_disk_name caching = var.data_disk_caching create_option = var.create_option disk_size_gb = var.data_disk_disk_size_gb lun = var.data_disk_lun storage_account_type = var.data_disk_storage_account_type disk_encryption_set_id = var.disk_encryption_set_id write_accelerator_enabled = var.data_disk_write_accelerator_enabled }
boot_diagnostics { storage_account_uri = var.storage_account_uri }
Steps to Reproduce
No response
Important Factoids
No response
References
No response