Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_virtual_machine_scale_set : Allow attaching data disks #47

Closed
hashibot opened this issue Jun 13, 2017 · 3 comments
Closed

azurerm_virtual_machine_scale_set : Allow attaching data disks #47

hashibot opened this issue Jun 13, 2017 · 3 comments

Comments

@hashibot
Copy link

This issue was originally opened by @shanielh as hashicorp/terraform#12713. It was migrated here as part of the provider split. The original body of the issue is below.


Terraform Version

Terraform v0.8.8

Affected Resource(s)

  • azurerm_virtual_machine_scale_set

Description

I Would like to create azure virtual machine scale set with attached data disks :

https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-attached-disks

@tombuildsstuff
Copy link
Contributor

Hey @shanielh

Thanks for opening this issue - apologies for the delayed response here!

Support for this was added in hashicorp/terraform#14608 which shipped in Terraform v0.9.6. As such it's now possible to attach data disks to VM Scale Set using the following Terraform configuration:

  storage_profile_data_disk {
    lun               = 0
    caching           = "ReadWrite"
    create_option     = "Empty"
    disk_size_gb      = 10
    managed_disk_type = "Standard_LRS"
  }

There's more documentation available on the Terraform Website too.

Would it be possible to take a look and see if upgrading to the latest version of Terraform (currently 0.10.2) fixes this issue for you? In the interim I'm going to close this issue since it appears to be fixed, however please feel free to re-open it if there's still an issue here and we'll take a look :)

Thanks!

@sampcoug
Copy link

@tombuildsstuff , I have created azurerm_virtual_machine_scale_set and used the configuration below to attach the data disk to the VM Scale set.

 storage_profile_data_disk {
    lun           = 0
    caching       = "ReadWrite"
    create_option = "Empty"
    disk_size_gb  = 100
  }

It shows that the disk has been attached when I run the query below:

az vmss show \
>   --resource-group xxx-resourceGroup \
>   --namexxx-scaleset \
>   --query virtualMachineProfile.storageProfile.dataDisks
[
  {
    "caching": "ReadWrite",
    "createOption": "Empty",
    "diskSizeGb": 100,
    "lun": 0,
    "managedDisk": {
      "storageAccountType": "Standard_LRS"
    },
    "name": null,
    "writeAcceleratorEnabled": null
  }
]

Is the disk in prepared state or they have to be prepared as mentioned in this article - https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/tutorial-use-disks-cli#prepare-the-data-disks?
If they need to be prepared, how do we go about preparing them using the terraform?

@ghost
Copy link

ghost commented Apr 23, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants