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

Block Storage: new data resource for volume #925

Closed
Shonei opened this issue Nov 15, 2019 · 4 comments
Closed

Block Storage: new data resource for volume #925

Shonei opened this issue Nov 15, 2019 · 4 comments

Comments

@Shonei
Copy link
Contributor

Shonei commented Nov 15, 2019

Hi there,

We are looking into adding a new data resource for volumes.

Terraform Version

Terraform v0.12.9
provider.openstack v1.23.0

Affected Resource(s)

openstack_blockstorage_volume_v2

The argument list we are thinking of is:

  • region
  • name
  • state
  • metadata
  • bootable
  • volume_type

And here are the attributes that will get computed:

  • size
  • id
  • source_volume_id

Does this seem acceptable ot should we change some of the parameters.

@ozerovandrei
Copy link
Member

Any PRs are welcome.

I guess that it will be also possible to implement openstack_blockstorage_volume_v3 in the same way you will implement openstack_blockstorage_volume_v2 since their List() method and options are similar.

https://github.com/gophercloud/gophercloud/blob/master/openstack/blockstorage/v2/volumes/requests.go#L113
https://github.com/gophercloud/gophercloud/blob/master/openstack/blockstorage/v3/volumes/requests.go#L115

@Shonei
Copy link
Contributor Author

Shonei commented Nov 18, 2019

Should I include the v2 and v3 in a single pull request.
Also for bootable and volume_type they are not options in the API but I can filter once I get a list of volumes. Should they be options for retrieving volumes or only part of the return attributes.

@ozerovandrei
Copy link
Member

@Shonei it's better to split PRs for different datasources.

Sure you can filter all results for needed arguments. We already doing this in some other datasources like compute_flavor_v2.

@Shonei
Copy link
Contributor Author

Shonei commented Dec 20, 2019

As both PR have been merged I will close this.

@Shonei Shonei closed this as completed Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants