Skip to content

Unable to create azurerm_managed_disk when set " storage_account_type = "PremiumV2_LRS" " #320

Open
@lmtsunshine

Description

Is there an existing issue for this?

  • 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

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?

image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions