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

Add metadata support for storage profile datasource #811

Merged
merged 5 commits into from
Apr 6, 2022

Conversation

adambarreiro
Copy link
Collaborator

@adambarreiro adambarreiro commented Mar 30, 2022

Created by #372

:warn: Depends on vmware/go-vcloud-director#454

This PR adds metadata support (read) for the storage profile datasource. This was tested manually, as there is no vcd_storage_profile resource to manipulate metadata. The manual test is as follows:

  • Go to the target VDC as System administrator, Provider view.
  • Select a target storage profile
  • Click on "Metadata" and add some string value.
  • Execute a Terraform apply with the datasource. Metadata should have been retrieved.

Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
@adambarreiro adambarreiro self-assigned this Apr 4, 2022
@adambarreiro adambarreiro marked this pull request as ready for review April 4, 2022 15:09
@adambarreiro adambarreiro removed the request for review from dataclouder April 4, 2022 15:09
@vbauzys
Copy link
Contributor

vbauzys commented Apr 5, 2022

could you check, maybe in config-gen we could use vpshere provider to add metadata in storage profile :)

@adambarreiro
Copy link
Collaborator Author

could you check, maybe in config-gen we could use vpshere provider to add metadata in storage profile :)

There seems to be a resource for storage policies: https://registry.terraform.io/providers/hashicorp/vsphere/latest/docs/resources/vm_storage_policy
But if we managed to create, still we'd need to add metadata through VCD.

@vbauzys
Copy link
Contributor

vbauzys commented Apr 5, 2022

could you check, maybe in config-gen we could use vpshere provider to add metadata in storage profile :)

There seems to be a resource for storage policies: https://registry.terraform.io/providers/hashicorp/vsphere/latest/docs/resources/vm_storage_policy But if we managed to create, still we'd need to add metadata through VCD.

Yes, you are right, even we could import resource we still add metadata on vpshere level, not VCD

Signed-off-by: abarreiro <abarreiro@vmware.com>
@adambarreiro adambarreiro merged commit 2d48521 into vmware:main Apr 6, 2022
@adambarreiro adambarreiro deleted the add-metadata-storage-profile branch April 6, 2022 10:48
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 this pull request may close these issues.

None yet

6 participants