From 27c260410c7180ad742dee2ecddff4d71c6c8bcd Mon Sep 17 00:00:00 2001 From: Chris Archibald Date: Thu, 13 Oct 2022 11:33:55 -0400 Subject: [PATCH] Sync bitbucket and GitHub --- CHANGELOG.md | 6 ++++-- cloudmanager/cvo_azure.go | 2 ++ .../resource_netapp_cloudmanager_cvo_azure.go | 18 +++++++++++++++++- examples/azure/resources.tf | 7 +++++-- website/docs/r/cvo_azure.html.markdown | 4 +++- 5 files changed, 31 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ad516d..78d7cdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 22.9.2 +## 22.10.0 NEW FEATURES: * resource/connector_snapmirror: support fsx as a source for snapmirror relationship with cvo. * resource/cvo_aws: add `retries` parameter to increase wait time when creating CVO. @@ -6,7 +6,9 @@ NEW FEATURES: * resource/cvo_gcp: add `retries` parameter to increase wait time when creating CVO. NEW ENHANCEMENTS: -* resource/connector_azure: display the depolyed virtual machine principal_id in state file on the connector azure creation. +* resource/connector_azure: display the deployed virtual machine principal_id in state file on the connector azure creation. +* resource/cvo_azure: add availability_zone_node1 and availability_zone_node2 to support HA deployment. +* resoruce/cvo_azure: add new support value "Premium_ZRS" in paramter storage_type. ## 22.9.1 NEW FEATURES: diff --git a/cloudmanager/cvo_azure.go b/cloudmanager/cvo_azure.go index 447e052..7e960d3 100644 --- a/cloudmanager/cvo_azure.go +++ b/cloudmanager/cvo_azure.go @@ -58,6 +58,8 @@ type azureEncryptionParameters struct { type haParamsAzure struct { PlatformSerialNumberNode1 string `structs:"platformSerialNumberNode1,omitempty"` PlatformSerialNumberNode2 string `structs:"platformSerialNumberNode2,omitempty"` + AvailabilityZoneNode1 int `structs:"availabilityZoneNode1,omitempty"` + AvailabilityZoneNode2 int `structs:"availabilityZoneNode2,omitempty"` EnableHTTPS bool `structs:"enableHttps"` } diff --git a/cloudmanager/resource_netapp_cloudmanager_cvo_azure.go b/cloudmanager/resource_netapp_cloudmanager_cvo_azure.go index 741d544..27bbbea 100644 --- a/cloudmanager/resource_netapp_cloudmanager_cvo_azure.go +++ b/cloudmanager/resource_netapp_cloudmanager_cvo_azure.go @@ -54,7 +54,7 @@ func resourceCVOAzure() *schema.Resource { Optional: true, ForceNew: true, Default: "Premium_LRS", - ValidateFunc: validation.StringInSlice([]string{"Premium_LRS", "Standard_LRS", "StandardSSD_LRS"}, false), + ValidateFunc: validation.StringInSlice([]string{"Premium_LRS", "Standard_LRS", "StandardSSD_LRS", "Premium_ZRS"}, false), }, "disk_size": { Type: schema.TypeInt, @@ -147,6 +147,16 @@ func resourceCVOAzure() *schema.Resource { Optional: true, ForceNew: true, }, + "availability_zone_node1": { + Type: schema.TypeInt, + Optional: true, + ForceNew: true, + }, + "availability_zone_node2": { + Type: schema.TypeInt, + Optional: true, + ForceNew: true, + }, "nss_account": { Type: schema.TypeString, Optional: true, @@ -372,6 +382,12 @@ func resourceCVOAzureCreate(d *schema.ResourceData, meta interface{}) error { cvoDetails.HAParams.PlatformSerialNumberNode2 = c.(string) } cvoDetails.HAParams.EnableHTTPS = d.Get("ha_enable_https").(bool) + if c, ok := d.GetOk("availability_zone_node1"); ok { + cvoDetails.HAParams.AvailabilityZoneNode1 = c.(int) + } + if c, ok := d.GetOk("availability_zone_node2"); ok { + cvoDetails.HAParams.AvailabilityZoneNode2 = c.(int) + } } err := validateCVOAzureParams(cvoDetails) diff --git a/examples/azure/resources.tf b/examples/azure/resources.tf index 1833f44..456c247 100644 --- a/examples/azure/resources.tf +++ b/examples/azure/resources.tf @@ -209,12 +209,15 @@ resource "netapp-cloudmanager_cvo_azure" "cvo-azure-ha" { tag_key = "xxx" tag_value = "YYY" } - storage_type = "Premium_LRS" + storage_type = "Premium_ZRS" + instance_type = "Standard_E8ds_v4" svm_password = "********" client_id = netapp-cloudmanager_connector_azure.cm-azure.client_id workspace_id = "workspace-xxxxxx" capacity_tier = "Blob" writing_speed_state = "NORMAL" is_ha = true - license_type = "azure-ha-cot-standard-paygo" + availability_zone_node1 = 1 + availability_zone_node2 = 2 + license_type = "ha-capacity-paygo" } diff --git a/website/docs/r/cvo_azure.html.markdown b/website/docs/r/cvo_azure.html.markdown index 2026c54..9186696 100644 --- a/website/docs/r/cvo_azure.html.markdown +++ b/website/docs/r/cvo_azure.html.markdown @@ -90,7 +90,7 @@ The following arguments are supported: * `workspace_id` - (Optional) The ID of the Cloud Manager workspace where you want to deploy Cloud Volumes ONTAP. If not provided, Cloud Manager uses the first workspace. You can find the ID from the Workspace tab on [https://cloudmanager.netapp.com](https://cloudmanager.netapp.com). * `data_encryption_type` - (Optional) The type of encryption to use for the working environment: ['AZURE', 'NONE']. The default is 'AZURE'. * `azure_encryption_parameters` - (Optional) AZURE encryption parameters. It is required if using AZURE encryption. -* `storage_type` - (Optional) The type of storage for the first data aggregate: ['Premium_LRS', 'Standard_LRS', 'StandardSSD_LRS']. The default is 'Premium_LRS' +* `storage_type` - (Optional) The type of storage for the first data aggregate: ['Premium_LRS', 'Standard_LRS', 'StandardSSD_LRS', 'Premium_ZRS']. The default is 'Premium_LRS' * `svm_password` - (Required) The admin password for Cloud Volumes ONTAP. * `client_id` - (Required) The client ID of the Cloud Manager Connector. You can find the ID from a previous create Connector action as shown in the example, or from the Connector tab on [https://cloudmanager.netapp.com](https://cloudmanager.netapp.com). * `resource_group` - (Optional) The resource_group where Cloud Volumes ONTAP will be created. If not provided, Cloud Manager creates the resource group (name of the working environment with suffix '-rg'). @@ -116,6 +116,8 @@ The following arguments are supported: * `is_ha` - (Optional) Indicate whether the working environment is an HA pair or not [true, false]. The default is false. * `platform_serial_number_node1` - (Optional) For HA BYOL, the serial number for the first node. * `platform_serial_number_node2` - (Optional) For HA BYOL, the serial number for the second node. +* `availability_zone_node1` - (Optional) For HA, the availability zone for the first node. +* `availability_zone_node2` - (Optional) For HA, the availability zone for the second node. * `ha_enable_https` - (Optional) For HA, enable the HTTPS connection from CVO to storage accounts. This can impact write performance. The default is false. * `upgrade_ontap_version` - (Optional) Indicates whether to upgrade ontap image with `ontap_version`. To upgrade ontap image, `ontap_version` cannot be 'latest' and `use_latest_version` needs to be false. * `retries` - (Optional) The number of attempts to wait for the completion of creating the CVO with 60 seconds apart for each attempt. For HA, this value is incremented by 30. The default is '60'.