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

Hooks #46

Closed
1 of 7 tasks
eladb opened this issue Dec 10, 2019 · 2 comments
Closed
1 of 7 tasks

Hooks #46

eladb opened this issue Dec 10, 2019 · 2 comments

Comments

@eladb
Copy link
Contributor

eladb commented Dec 10, 2019

PR Champion
#

Description

Allow specifying arbitrary handlers which execute as part of the deployment process and hook them into various events such as before/after a resource or before/after stack deployments.

See #75 for a discussion
Then, use these for e.g. integration test assertions (#31)

Progress

  • Tracking Issue Created
  • RFC PR Created
  • Core Team Member Assigned
  • Initial Approval / Final Comment Period
  • Ready For Implementation
    • implementation issue 1
  • Resolved
@MrArnoldPalmer MrArnoldPalmer added the status/proposed Newly proposed RFC label Jan 3, 2020
@eladb
Copy link
Contributor Author

eladb commented Jun 23, 2020

From #71:

I've been digging through the source and the docs for a while now and it appears there are no events output by the app, a stack, or constructs. This makes it difficult or impossible to use the CDK to orchestrate environments that require non-cfn related tasks.

Ex:

  • I have a stack that generates a bucket
  • When the bucket is created I want to upload a file
  • Once that file is uploaded I want to trigger another stack

I can orchestrate this with a pipeline - which is what I'll do. But I'd like to be able to manage this locally as part of a package where a single cli command can kick this off. I'm sure there other use cases for events as well.

What I'd like to see:

Events added to a stack that are emmitted on state change:

var Stack = new CustomStack(app, 'CustomStack');
Stack.on('change', evt => {
  if (evt.State == States.CREATE_COMPLETE) {
    // do my thing;
  }
})

I also think individual resources could use these events.

@eladb eladb removed the status/proposed Newly proposed RFC label Jun 23, 2020
@eladb eladb closed this as completed Jun 23, 2020
@eladb
Copy link
Contributor Author

eladb commented Jun 23, 2020

Duplicate #71

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