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

VMSS: support for specifying the OS Disk Size #160

Closed
bpoland opened this issue Jul 7, 2017 · 13 comments · Fixed by #448 or #4518
Closed

VMSS: support for specifying the OS Disk Size #160

bpoland opened this issue Jul 7, 2017 · 13 comments · Fixed by #448 or #4518
Assignees
Labels
enhancement service/vmss Virtual Machine Scale Sets
Milestone

Comments

@bpoland
Copy link

bpoland commented Jul 7, 2017

Terraform Version

Terraform v0.9.11

Affected Resource(s)

  • azurerm_virtual_machine_scale_set

There are several things that aren't available for azurerm_virtual_machine_scale_set but are available for individual VMs. I have done all of them using ARM templates so I know it's possible in Azure, but terraform doesn't allow them (I tried :)

Please let me know if I should split this out into separate requests for each.

  1. Would it be possible to support a boot_diagnostics block in the VMSS configuration, just like the one in azurerm_virtual_machine? See the "How do I turn on boot diagnostics" section here: https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-faq (@tombuildsstuff: this is now available)

  2. Could you please add support for network security groups in a VMSS? This is already there for azurerm_network_interface but not for the scale set. It seems like it would just be a network_security_group_id field inside the VMSS network_profile. (@tombuildsstuff: this is now available)

  3. Could you please add the ability to specify a size for OS Disks? In azurerm_virtual_machine there is a storage_os_disk block where you can specify disk_size_gb, but with the VMSS the storage_profile_os_disk block does not support the disk_size_gb field (the VMSS storage_profile_data_disk does support disk_size_gb but I need the OS disk).

Thank you!

@flyinprogrammer
Copy link

looks like we have to wait for them to cut a newer sdk before a lot of these features are even available for us to consume:

https://github.com/Azure/azure-sdk-for-go/blob/experimental/allAPIVersions/service/compute/management/2017-03-30/compute/models.go#L1438-L1444

In theory we can start working on this when they cut v12 of the SDK.

Azure/azure-sdk-for-go#631
https://github.com/Azure/azure-sdk-for-go/milestone/10

@bpoland
Copy link
Author

bpoland commented Sep 5, 2017

Ok, thanks for the update.

@mbfrahry
Copy link
Member

@bpoland, I was able to address all but the third issue. Unfortunately, the azure sdk doesn't support changing the size of the os disk yet. I would suggest opening an issue on their repo if there isn't one already. Feel free to reopen this if you have anymore issues!

@bpoland
Copy link
Author

bpoland commented Oct 23, 2017

@mbfrahry thanks so much for this! Could you tell me a bit more about what I need to request from the Azure SDK for the third one? I looked on https://github.com/Azure/azure-sdk-for-go/issues and don't see any open issues that seem related to this request.

I have been able to expand the disk size upon creation with the below block in an ARM template with API version 2017-03-30 (but obviously would like to use native terraform instead). So do I just need to request that they add support for API version 2017-03-30 or something more specific to the VMSS?

                    "storageProfile": {
                        "osDisk": {
                            "caching": "ReadWrite",
                            "createOption": "FromImage",
                            "diskSizeGB": "10",
                            "name": "[concat(variables('vmssName'), '-osp')]",
                            "osType": "Linux",
                            "image": {
                                "uri": "[variables('vmssImageUri')]"
                            }
                        }
                    },

@mbfrahry
Copy link
Member

Hey @bpoland! No problem on adding the vmss features! For the last feature, I'd just make an issue that they add the field you need. It looks like they may have forgotten it and it looks pretty painless to add. I may be wrong but it looks like they need to add that field here https://github.com/Azure/azure-sdk-for-go/blob/master/arm/compute/models.go#L1994.

I'll reopen this issue and feel free to add the issue link from the sdk here. Let me know how things go/if you need anything else

@mbfrahry mbfrahry reopened this Oct 23, 2017
@bpoland
Copy link
Author

bpoland commented Oct 23, 2017

Thanks for the link. I have opened this issue for them to add it: Azure/azure-sdk-for-go#818

Hopefully that made sense for them :)

Thanks again for your help.

@bpoland
Copy link
Author

bpoland commented Oct 23, 2017

It has been bumped upstream to Azure/azure-rest-api-specs#1906

@katbyte katbyte modified the milestones: M1, Future May 10, 2018
@katbyte
Copy link
Collaborator

katbyte commented May 10, 2018

Still waiting on the field to make its way into the SDK.

@tombuildsstuff tombuildsstuff changed the title Add missing VMSS capabilities VMSS: support for specifying the OS Disk Size May 16, 2018
@tombuildsstuff tombuildsstuff added enhancement upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR and removed M1 upstream labels May 16, 2018
@tombuildsstuff tombuildsstuff modified the milestones: Future, Being Sorted, 2.0.0 Oct 25, 2018
@sushilkm
Copy link

Is there an update regarding this feature to specify disk_size for os_disk_profile.

@tombuildsstuff
Copy link
Contributor

@sushilkm in the upcoming version 2.0 of the Azure Provider we're working to add replacements for the azurerm_virtual_machine and azurerm_virtual_machine_scale_set resources. As such whilst this change won't be added to the azurerm_virtual_machine_scale_set resource, it'll be added to it's replacement which we're starting to look into at the moment :)

@tombuildsstuff tombuildsstuff self-assigned this Sep 30, 2019
@tombuildsstuff tombuildsstuff removed breaking-change upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR labels Oct 4, 2019
@tombuildsstuff
Copy link
Contributor

hi @bpoland @flyinprogrammer @sushilkm

We're currently working on version 2.0 of the Azure Provider which we previously announced in #2807.

As a part of this we're introducing five new resources which will supersede the existing azurerm_virtual_machine and azurerm_virtual_machine_scale_set resources:

  • azurerm_linux_virtual_machine
  • azurerm_linux_virtual_machine_scale_set
  • azurerm_virtual_machine_scale_set_extension
  • azurerm_windows_virtual_machine
  • azurerm_windows_virtual_machine_scale_set

We've recently opened the PR for the first of these new resources #4518 - and I'm able to confirm that this new functionality is supported in the new Virtual Machine Scale Set resource - however unfortunately we have no plans to backport this to the existing azurerm_virtual_machine_scale_set resource.

We've posted an update in #2807 with more information on this (we plan to release the new Virtual Machine / Virtual Machine Scale Set resources in a Beta form in a future 1.x version of the Azure Provider and subsequently release them as "GA" in 2.0) - but as we plan to post additional status updates for 2.0 in #2807 I'd suggest subscribing to that issue for updates.

This issue's been assigned to the milestone "2.0" since this is where this will ship - however (due to the way that closing Github Issues from PR's works, to be able to track this back for future users) this issue will be closed once the first of the new resources have been merged.

Thanks!

@ghost
Copy link

ghost commented Feb 24, 2020

This has been released in version 2.0.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.0.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Feb 25, 2020

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 Feb 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.