hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.51k stars 4.6k forks source link

Support for NVMe controllers #22058

Open kvietmeier opened 1 year ago

kvietmeier commented 1 year ago

Is there an existing issue for this?

Community Note

Description

Some IaaS Database applications require the performance of NVMe data drives.

MSLearn - add NVMe controllers

_A new feature has been added to the VM configuration, called DiskControllerType, which allows customers to select their preferred controller type as NVMe or SCSI. If the customer doesn't specify a DiskControllerType value then the platform will automatically choose the default controller based on the VM size configuration. If the VM size is configured for SCSI as the default and supports NVMe, SCSI will be used unless updated to the NVMe DiskControllerType.

NVMe can be enabled during VM creation using various methods such as: Azure portal, CLI, PowerShell, and ARM templates. To create an NVMe VM, you must first enable the NVMe option on a VM and select the NVMe controller disk type for the VM. Note that the NVMe diskcontrollertype can be enabled during creation or updated to NVMe when the VM is stopped and deallocated, provided that the VM size supports NVMe. _

New or Affected Resource(s)/Data Source(s)

azurerm v3.57.0

Potential Terraform Configuration

resource "azurerm_linux_virtual_machine" "vms" {
  location            = azurerm_resource_group.multivm_rg.location
  resource_group_name = azurerm_resource_group.multivm_rg.name

  nvme_controller_enabled = "True"

}


### References

https://learn.microsoft.com/en-us/azure/virtual-machines/enable-nvme-interface
pc-dok commented 1 year ago

give it here a new status? we also can not use this feature with terraform.

osds-labs commented 1 year ago

any status on this?

lucasmelogithub commented 11 months ago

This would be useful for MV3 SAP VMs too where diskControllerType and SecurityType are required. Any updates?

kvietmeier commented 10 months ago

Progress of a sort - checking for them is a first step to enabling them.

The tricky bit is that only the E-Series supports NVMe so we need to enable them but also check to make sure we chose the right instance type.

This looks like a great first step - the end user can do the check - just document that you can only use E-Series and fail if you choose another instance?

ms-zhenhua commented 1 month ago

Hi @kvietmeier, seems the provider has already supported NVMe. Could you please double confirm whether the disk_controller_type is what you are looking for?