Unable to create azurerm_managed_disk when set " storage_account_type = "PremiumV2_LRS" "
- Dominant language
- HCL
- Stars
- 925
- Forks
- 930
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 5
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Terraform Version
1.0.0
### Provider Version
0.1.0
### Current Behavior
I want to create disk for my vm,and set disk sku to PremiumV2_LRS; I saw the azurerm_managed_disk document , found the field storage_account_type support PremiumV2_LRS (see https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/managed_disk#storage_account_type)
so I write my iac script , to create a disk,but when i plan this script, i got a error "Error: expected storage_account_type to be one of [Standard_LRS StandardSSD_ZRS Premium_LRS Premium_ZRS StandardSSD_LRS UltraSSD_LRS], got PremiumV2_LRS"
### Expected Behavior
Create a PremiumV2_LRS disk sccuess
### Terraform configuration
```terraform
resource "azurerm_managed_disk" "copy" {
name = "acctestmd2"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
storage_account_type = "PremiumV2_LRS"
create_option = "Copy"
source_resource_id = azurerm_managed_disk.source.id
disk_size_gb = "1"
tags = {
environment = "staging"
}
}
```
### Steps To Reproduce
terraform plan
### Anything else?

Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the reported terraform plan with the provided azurerm_managed_disk configuration and compare the provider's accepted storage_account_type values with the linked documentation. Trace the validation entry point for this resource and add or update coverage for PremiumV2_LRS; done means the plan accepts the value and creates the disk successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, terraform
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100