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

volume datasource: snapshot_policy and export_policy are not returned correctly #31

Closed
okrause opened this issue Nov 23, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@okrause
Copy link
Contributor

okrause commented Nov 23, 2020

When querying a volume cia the volume datasource, the snapshot_policy is returned wrong (all fields filled with default 0) and the export_policy is not returned at all.

After doing some investigation, I found out that the data source code is using getVolumeByNameOrCreationToken, which in turn uses a "Describe all volumes" (/v2/projects/{projectNumber}/locations/{locationId}/Volumes) call, which doesn't return all fields.

To get all fields, an individual volume needs to be queried with a "Describe a volume" REST call (/v2/projects/{projectNumber}/locations/{locationId}/Volumes/{volumeId}).

After describing all the volumes and find the relevant ones, we likely have to query each of the volumes in our result set again individually to get all the details.

okrause added a commit to okrause/terraform-provider-netapp-gcp that referenced this issue Nov 23, 2020
@lonico lonico added the bug Something isn't working label Nov 24, 2020
@okrause
Copy link
Contributor Author

okrause commented Dec 2, 2020

Fixed in 848d687

Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants