-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core+cli): support tagging of stacks (#2185)
Adding tags parameter option to cdk deploy command to allow tagging full stacks and their associated resources. Now it will be possible to: ``` const app = new App(); const stack1 = new Stack(app, 'stack1', { tags: { foo: 'bar' } }); const stack2 = new Stacl(app, 'stack2'); stack1.node.apply(new Tag('fii', 'bug')); stack2.node.apply(new Tag('boo', 'bug')); ``` That will produce * stack1 with tags `foo bar` and `fii bug` * stack2 with tags `boo bug` It is possible also to override constructor tags with the stack.node.apply. So doing: ``` stack1.node.apply(new Tag('foo', 'newBar'); ``` stack1 will have tags `foo newBar` and `fii bug` Last, but not least, it is also possible to pass it via arguments (using yargs) as in the following example: ``` cdk deploy --tags foo=bar --tags myTag=myValue ``` That will produce a stack with tags `foo bar`and `myTag myValue` **Important** That will ignore tags provided by the constructor and/or aspects. Fixes #932
- Loading branch information
1 parent
0b1bbf7
commit d0e19d5
Showing
14 changed files
with
209 additions
and
47 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
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.