CDK Aspect to tag resources with git metadata. This provides a nice connection between the construct and the git repository.
Project description
CDK Aspect Git Tagger
This is a CDK Aspect that will tag your CDK Stacks with the current git repo location for easier identification of deployed stacks.
How to install
npm install @layerborn/cdk-git-tagger
or
npm install @layerborn/cdk-git-tagger
How to use
import { GitUrlTagger } from '@layerborn/cdk-git-tagger';
import { App, Aspects, Stack, StackProps } from 'aws-cdk-lib';
import { Topic } from 'aws-cdk-lib/aws-sns';
import { Construct } from 'constructs';
export class MyStack extends Stack {
constructor(scope: Construct, id: string, props: StackProps = {}) {
super(scope, id, props);
// define resources here...
new Topic(this, 'MyTopic');
}
}
const app = new App();
new MyStack(app, 'cdk-aspect-git-tagger-tester');
Aspects.of(app).add(new GitUrlTagger());
app.synth();
Example Output
{
"Resources": {
"MyTopic86869434": {
"Type": "AWS::SNS::Topic",
"Properties": {
"Tags": [
{
"Key": "GitUrl",
"Value": "https://github.com/layerborn/cdk-cool-construct.git"
}
]
}
}
}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for layerborn.cdk-git-tagger-0.0.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97475331abf5ac9ebec04abf862646913ae9d9703ae35773284e9d8eadfa855d |
|
MD5 | 154d2c1ea3ff7f7afe5d93f9fc6878b3 |
|
BLAKE2b-256 | 165723ab9f60191c92f8e95bd3cfbbd763999b2865d71055ed61ca07e0126166 |
Close
Hashes for layerborn.cdk_git_tagger-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0410f4bca5a5c507df994eeeb43c64eb204e27a7b0184ef927b8783f3e405843 |
|
MD5 | 207796ab80916fa7ecf61bc3ebd5fdb5 |
|
BLAKE2b-256 | eaa437e9b1697f98b95f345ee15148dc55591025037ccefafbcea611a0eacfeb |