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

Multizone volume doesn't work #48

Closed
pablogarciaarevalo opened this issue Sep 25, 2021 · 1 comment · Fixed by #49
Closed

Multizone volume doesn't work #48

pablogarciaarevalo opened this issue Sep 25, 2021 · 1 comment · Fixed by #49

Comments

@pablogarciaarevalo
Copy link
Contributor

I am unable to create a multi-zone volume using the 'regional_ha = true' attribute. The zone is mandatory due to the approved issue #21 and it should be modified with something like this:

https://github.com/NetApp/terraform-provider-netapp-gcp/blob/master/gcp/resource_netapp_gcp_volume.go#L421

// If storage class is 'software', zone or regionalHA is mandatory
if volume.StorageClass == "software" && ((volume.Zone == "" && volume.regionalHa == "") || (volume.Zone != "" && volume.regionalHa != "")) {
log.Print("Error creating volume")
return fmt.Errorf("If storage_class is software, zone or regionalHA is mandatory")
}

Note that TF creates a single zone volume using both 'zone' and 'regional_ha' attributes, and a multizone volume is created successfully with the same both attributes using Rest API calls.

@okrause
Copy link
Contributor

okrause commented Sep 27, 2021

Yes, I realised that on Friday also and want to give it some investigation this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants