NetApp / terraform-provider-netapp-cloudmanager

Terraform provider to create NetAPP OCCM instances, CVO resources, volumes, snapshots, ... in Azure, AWS, GCP.
Mozilla Public License 2.0
17 stars 27 forks source link

Parameter 'zone' should not be mandatory deploying CVO-HA on GCP #146

Closed pablogarciaarevalo closed 1 year ago

pablogarciaarevalo commented 1 year ago

Deploying a CVO-HA on Google Cloud requires the parameter 'zone'.

Error: Missing required argument The argument "zone" is required, but no definition was found.

Using 'is_ha = true' to specify that it's a HA deployment and not a Single Node, the 'zone' parameter should not be mandatory but the parameters 'node1_zone', 'node2_zone', and 'mediator_zone'.

chuyich commented 1 year ago

In here, the zone is actually 'GCP Region' on the UI

image
pablogarciaarevalo commented 1 year ago

This is not the meaning of a zone. Neither in the provider documentation: zone - (Required) The zone of the region where the working environment will be created

chuyich commented 1 year ago

The "zone" in terraform will be converted to "region". For example, if the zone is set as "us-east1-b", it will be converted to "us-east1" as "region" for creating the GCP HA CVO. Will update the document to clarify this.

pablogarciaarevalo commented 1 year ago

Thank you for quick your response.

Regardless that IMHO deploying a CVO HA specifying a GCP region in the zone parameter, the same zone parameter that we use to specify the GCP zone deploying a CVO SN and we don't have to set the GCP region in other parameter is confused and inconsistent, I've just tested the HA deployment using a GCP region in the zone parameter and it fails with an unknown error.

Error: code: 400, message: {"message":"Bad Request","causeMessage":"SimplicatorBadRequestException: Bad Request"}
  with netapp-cloudmanager_cvo_gcp.cvo-gcp,
  on cvo_11.tf line 15, in resource "netapp-cloudmanager_cvo_gcp" "cvo-gcp":
  15: resource "netapp-cloudmanager_cvo_gcp" "cvo-gcp" {

Our CVO HA deployment example suggests indeed to use a GCP zone, not a region: https://github.com/NetApp/terraform-provider-netapp-cloudmanager/blob/main/examples/gcp/resources.tf#L89

chuyich commented 1 year ago

Would you please run with debug flag and share the log with us? TF_LOG="DEBUG" terraform apply

pablogarciaarevalo commented 1 year ago

Sure, Here you have. cvo-ha-zone-issue.txt Thank you

chuyich commented 1 year ago

For the value of zone, it should be "europe-southwest1-a"

pablogarciaarevalo commented 1 year ago

Yes. But this is the reason that I opened this issue. This parameter makes sense for a CVO Single Node deployment. But it should not be required in a CVO High Availability deployment, the parameters 'node1_zone', 'node2_zone', and 'mediator_zone' should be the good ones.

chuyich commented 1 year ago

Thanks for pointing this. Raised DEVOPS-5814 to track this issue.

lonico commented 1 year ago

fixed in VERSION 23.1.1