-
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
RDE (Runtime Defined Entities) framework support with Runtime Defined Entity Interfaces resource and data source (1/3) #965
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]>
adambarreiro
changed the title
Add RDE support with Defined Interfaces, RDE types and RDEs
Start with RDE support with Defined Interfaces
Jan 2, 2023
adambarreiro
changed the title
Start with RDE support with Defined Interfaces
Start with RDE (Runtime Defined Entities) framework support with Defined Interfaces resource and data source
Jan 2, 2023
Signed-off-by: abarreiro <[email protected]>
Merged
10 tasks
adambarreiro
commented
Jan 2, 2023
adambarreiro
commented
Jan 2, 2023
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]>
adambarreiro
changed the title
Start with RDE (Runtime Defined Entities) framework support with Defined Interfaces resource and data source
RDE (Runtime Defined Entities) framework support with Defined Interfaces resource and data source (1/3)
Jan 4, 2023
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]>
terraform-provider-vcd-bot
added
test-running:acc
test-failed:acc
and removed
test-request:acc
test-running:acc
labels
Jan 27, 2023
adambarreiro
changed the title
RDE (Runtime Defined Entities) framework support with Defined Interfaces resource and data source (1/3)
RDE (Runtime Defined Entities) framework support with Runtime Defined Entity Interfaces resource and data source (1/3)
Jan 30, 2023
lvirbalas
requested changes
Jan 30, 2023
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Didainius
reviewed
Jan 31, 2023
Signed-off-by: abarreiro <[email protected]>
Didainius
approved these changes
Jan 31, 2023
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]>
lvirbalas
approved these changes
Feb 8, 2023
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.
My only reservation is whether nss
(field name coming from the API) is not too cryptic for the new users.
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
adezxc
approved these changes
Feb 14, 2023
Signed-off-by: abarreiro <[email protected]>
dataclouder
approved these changes
Feb 21, 2023
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR depends on vmware/go-vcloud-director#527
This PR adds a new resource and data source vcd_rde_interface to be able to create, read, update and delete Defined Interfaces, and also to import existing ones into Terraform state.
Design details
To define a Defined Interface unequivocally, one needs
vendor
,nss
andversion
:vendor
,nss
,version
) can't have a different name. Otherwise it fails withRDE_INTERFACE_ALREADY_EXISTS
.vendor
,nss
,version
) can have the same name.An example of a valid scenario:
Because the 3-tuple (
vendor
,nss
,version
) is different.An example of a wrong scenario:
Creation of
differentName
will fail as the 3-tuple is being reused.Because of the constraint above, the data source requires only the
vendor
,nss
andversion
. In other words, we can't usename
to fetch Defined Interfaces for the data source because it can be non-unique.In the resource, all attributes except
name
haveForceNew: true
, this is because the PUT endpoint in VCD API ignores all changes in fields except forname
. Also, ifname
is not sent during the PUT, API fails with a very ugly error.To import an existing Defined Interface from VCD into Terraform state, one needs to build an URN like
vendor.nss.version
. As version follows SemVer, the identifier results in something likevmware.kubernetes.1.0.0
which can be visually odd. The usage of.
as separator can be changed withVCD_IMPORT_SEPARATOR
, but as with the data source, one requires the version to unequivocally identify the Defined Interface.Disclaimer
The new resource vcd_rde_interface does NOT add behaviors support in this PR. A "behavior" is an extension of the capabilities of the Defined Interfaces that would require an extra resource (something like vcd_rde_interface_behavior). These behaviors can be mapped in the Runtime Defined Entity types
hooks map[string]string
property, where this map supports PRE_CREATED, POST_CREATION, etc as keys and behavior IDs coming from Defined Interfaces as values.RDE saga: