-
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
provider/azurerm: Add support for managed availability sets. #12532
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @rrudduck
Just need clarification on the SKU changes and an update to the docs.
@@ -93,6 +102,13 @@ func resourceArmAvailabilitySetCreate(d *schema.ResourceData, meta interface{}) | |||
Tags: expandTags(tags), | |||
} | |||
|
|||
if managed == true { | |||
n := "Aligned" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you clarify this behaviour? The normal approach is to expose the SKU options on on the resource schema as special behaviour can put us in tricky situations with future API updates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the documentation here: https://docs.microsoft.com/en-us/rest/api/compute/availabilitysets/availabilitysets-create it's not a full sku object. It's just sku.name that is used.
sku.name Specifies whether the availability set is managed or not. Possible values are: Aligned or Classic. An Aligned availability set is managed, Classic is not.
I thought the easier change was to specify managed or not as a boolean since that is how it's represented in the portal. Additionally in the sdk (https://github.com/Azure/azure-sdk-for-go/blob/master/arm/compute/models.go#L415) there is a property for "managed" but it does not appear in the REST docs and does not appear to be used when I tested it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should also not that there did not appear to be a constant for that value defined in the SDK either.
https://github.com/Azure/azure-sdk-for-go/search?q=Aligned&type=Code&utf8=%E2%9C%93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification!
resource_group_name = "${azurerm_resource_group.test.name}" | ||
platform_update_domain_count = 10 | ||
platform_fault_domain_count = 1 | ||
managed = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: formatting
Tests pass @pmcatominey :)
|
Formatting should be resolved. |
* Add support for managed availability sets. * Formatting.
…rp#12532) * Add support for managed availability sets. * Formatting.
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. |
This PR enables specifying an availability set as being managed. An availability set must be managed in order to have VMs with managed disks as members.