-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(events): better modeling of CW Event Targets #2576
Merged
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
WE used to have this because we couldn't validate what tokens returned previously, but now that we have PostProcessingToken we can!
4 tasks
eladb
approved these changes
May 20, 2019
This was referenced Aug 22, 2019
This was referenced Dec 12, 2019
This was referenced Jan 20, 2020
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.
Move new event targets into
@aws-cdk/aws-events-targets
Invocation payloads are now under the control of the target classes, so
that targets for which the payload maps onto API calls (such as ECS,
CodeBuild, etc) can specify the API parameters directly as props.
EventTargetInput
is a union class with three variants, allowingserialization of strings, multiline strings and objects. Target inputs
support a special type of Token (
EventField
) which can be used torefer to fields from the event, instead of value literals. A number of
predefined events and the fields that they have available have been
defined, so that accessing them becomes even more convenient
(
StageChangeEvent
,PhaseChangeEvent
,ReferenceEvent
).To be able to use Tokens to implement EventInput substitution, add a
refactoring and more principaled separation of concerns in the Token
code. Resolution can now be more easily hooked, CloudFormation-aware
string concatenation is implemented using a plugin, and Token callbacks
receive an
IResolveContext
which they can use to resolve deeper (andwill reuse the same settings that the resolver was started with). We
should as good as be able to get rid of
stack.node.resolve()
in thenear future.
ALSO:
LatestDeploymentResource
to use existing logical IDoverriding features.
onEvent()
method toCloudTrail
.rendering would lead to stateful side effects. Make Actions render
out their region directly, if set, without requiring overrides.
assignPublicIp
now defaults toundefined
, insteadof
DISABLED
, to align with service API.CfnReference
objects upon resolution would fail to be detectedduring cross-stack reference analysis;
CfnReference
now hasstatic methods that return singleton objects.
CfnResource.toCloudFormation()
. We can now usePostProcessToken
to apply the property renames and output validation we were originally
doing the resolve for.
Fixes #2403, fixes #2404, fixes #2581.
BREAKING CHANGES
@aws-cdk/aws-codepipeline.Pipeline
is no longer an event targetitself, use
@aws-cdk/aws-events-targets.CodePipeline
instead.@aws-cdk/aws-stepfunctions.StateMachine
is no longer an event targetitself, use
@aws-cdk/aws-events-targets.SfnStateMachine
instead.@aws-cdk/aws-ecs.Ec2RunTask
has been renamed to@aws-cdk/aws-events-targets.EcsEc2Task
.CloudFormationJSON.stringify()
is now renamed toCloudFormationLang.toJSON()
.Pull Request Checklist
design
folderBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.