-
Notifications
You must be signed in to change notification settings - Fork 112
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 to Provider VDC #1126
Conversation
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will trust you on running tests for whole suite, but I have attempted to use metadata_entry
in vcd_provider_vdc
resource and data source manually - that worked.
I'll probably have to re-run everything as this one clashes with #1146 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Full acceptance tests pass in 10.5
Signed-off-by: abarreiro <[email protected]>
Description
This PR adds the attribute
metadata_entry
to thevcd_provider_vdc
resource.Solution
The difficulty of this one is the fact that
vcd_provider_vdc
is the only resource we have that does not have the old and deprecatedmetadata
attribute. For that reason, this PR adapts the current code to accommodate this new casuistic:There's a completely new schema for resources that do not have old
metadata
attribute. The reason is that these don't need any Computed value (as we don't need to have both things co-living). Also the new schema takes advantage of Terraform built-ins likeRequired
orDefault
that were not possible in the previous schema, also due to compatibility reasons.The testing framework for metadata is adapted to be able to skip the steps that test old metadata, as this does not exist in the new kind of resources.
Other minor refactors, like function splitting, have been done.
Tests
TEST_VCD_METADATA_IGNORE=1
ignore_metadata_changes
works, try different combinations.