-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cdk): Tokens can be converted to strings (#518)
Tokens (such as resource attributes) can now be implicitly converted into strings. This allows using any late-bound CloudFormation value where strings can be used in the host language, and the native string facilities of the host language can be used as well to further process strings. The process is reversed by the resolve() function during synthesis, which will split the string up again into string literals and CloudFormation intrinsics (combined by `{Fn::Join}`). Introduces `CloudFormationJSON.stringify` to produce a similar result, but used for JSON-encoding of complex objects that may contain Tokens. This is used in JSON-encoded policy statements, CloudFormation actions, state machine definitions, and more. Additional changes: - Add a VSCode launch config (with a helper script) to directly debug a unit test from within the IDE. This allows setting breakpoints. - SecretParameter no longer duckily implements Token; this will not work in other jsii languages anyway. - Nested `FnConcat` structures will be flattened in the CloudFormation output. Fixes #24 and #168.
- Loading branch information
Showing
33 changed files
with
1,005 additions
and
464 deletions.
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.