-
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 RDE Type hooks #1122
Merged
Merged
Add RDE Type hooks #1122
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 <abarreiro@vmware.com>
adambarreiro
requested review from
lvirbalas,
Didainius,
dataclouder and
adezxc
as code owners
September 29, 2023 12:58
dataclouder
approved these changes
Oct 2, 2023
lvirbalas
reviewed
Oct 3, 2023
Signed-off-by: abarreiro <abarreiro@vmware.com>
lvirbalas
approved these changes
Oct 3, 2023
adezxc
reviewed
Oct 5, 2023
adezxc
approved these changes
Oct 5, 2023
Signed-off-by: abarreiro <abarreiro@vmware.com>
Didainius
approved these changes
Oct 11, 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.
Thanks. Test also passed in 10.4.0, 10.4.1, 10.4.2
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 adds a new feature to existing
vcd_rde_type
resource and data source: Thehook
blocks.A
hook
block maps a lifecycle event of a given Runtime Defined Entity (vcd_rde
), one of:PostCreate
: After the RDE of this type is createdPostUpdate
: After the RDE of this type is updatedPreDelete
: Before the RDE of this type is deletedPostDelete
: After the RDE of this type is deletedwith an existing Behavior. This allows customers to automatically invoke the desired Behavior when these lifecycle events are triggered.
For example, let's imagine there's a Behavior that calls a webhook to send a message to a Slack channel.
If we have an RDE Type with the new block:
Whenever a RDE of that Type is created, it will send a message to Slack!
Implementation details
A new block
hook
is added tovcd_rde_type
resource and data source. This has the sub-propertiesevent
(the lifecycle event) andbehavior_id
.The Behavior referenced by the ID must exist already.
Tests
Tests passed in VCD 10.5.0