-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Azure Managed Disks #11874
Comments
@markrendle do you know if the SDK supports this yet? I can't find anything in it |
Looks like it's in the 8.0.0-beta release: Azure/azure-sdk-for-go#538 (comment) |
@markrendle nps - we have some breaking changes in that SDK upgrade to deal with first then we can start to look at this new feature |
@stack72 Hi Paul, is there an open issue for the SDK upgrade that we can track as well? |
There is indeed #11866 Once we get the breaking changes taken care of, we can merge it P. |
I took a look at adding this in now that the SDK has been updated and it appears there is still issues with the SDK. Unless I'm missing something the Compute provider in the SDK wasn't updated to version 2016-04-30-preview which means the managed disk support isn't there. |
@rrudduck i was able to create a managed disk with some work I did but didn't get too far with it but did you add the section to import manage disk support to Path should be like
|
I didn't try creating the disk itself, I was trying to use the implicit create support. Reading through the docs it appeared that by omitting some of the storage profile details a managed disk would be automatically created when the VM was created. I could be wrong though - that's just my impression after looking at the ARM templates. |
I've confirmed that by manually modifying the go sdk in vendor to use the correct api version for compute, updating the client and terraform validations, this manifest works:
Which results in this: So we definitely need an sdk update. I've opened an issue on that side to request it. EDIT: Looks like the PR Azure/azure-sdk-for-go/pull/561 has the update for the compute provider in it. |
Looks like the azure-sdk-for-go PR from @mcardosos (Azure/azure-sdk-for-go#561) was merged so I took a crack at implementing the explicit support for managed disks in compute. Would love feedback: brandontosch/GH-11874
Thanks! **Updated structure to reflect code changes |
@brandontosch sorry to be so frank to just ask... not sure if you're a packer user... but if you are, would you mind checking this out? hashicorp/packer#4511 |
@brandontosch Those changes look pretty good. Once additional change you could make is supporting the explicit attach scenario. There is an id property in ManagedDiskProperties. https://github.com/Azure/azure-sdk-for-go/blob/master/arm/compute/models.go#L616 |
@davidobrien1985 Haven't had much exporsure to packer, but then again I didn't have any experience with Terraform a few weeks ago either.. I'd love to take a look when I get some time, just not quite sure when that would be at the moment. Had to jump on this because my team is currently in the middle of a migration to azure and we needed the managed disk support asap. @rrudduck Thanks for the feedback! I'll take a look at that today. I'm assuming this can be used when creating managed disks via arm/disk rather than via a compute resource? |
@brandontosch Yep. You can see an example in the python docs here: https://azure-sdk-for-python.readthedocs.io/en/latest/sample_azure-mgmt-manageddisks.html#virtual-machine-with-managed-disks |
@rrudduck awesome, thanks for the example! |
Created a PR with what I've come up with for this: #12455 |
really looking for this! PR looks almost done, do we know if this will be back ported to 0.8.X or only 0.9.1 ? |
Hi @djsly - this will be 0.9.2 only - there will no longer be any 0.8.x releases |
@markrendle @rrudduck @mzupan @davidobrien1985 @djsly FYI I've just merged @brandontosch's PR (#12455) which adds support for Managed Disks - which will be in the next release :) @brandontosch thanks once again for this great contribution :) |
Sorry to resurrect a bit, but I've just used this feature to create a fresh VM with an automatically created managed disk (via Have I missed something, or should I open a new issue / get this re-opened to cover this? |
Hi @glenjamin |
Awesome, thanks! I missed this because I was only looking at the storage_os_disk section |
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
I couldn't find an issue about support for the the new Managed Disks for Azure VMs. I'm guessing it'll require a change to https://github.com/hashicorp/terraform/blob/master/builtin/providers/azurerm/resource_arm_virtual_machine.go ?
The text was updated successfully, but these errors were encountered: