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.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45a6cc11172d680c1fedfe802776a16770f31c5b6a6c12998adbf4d91811568d |
|
MD5 | e2eef1c237d7769fabb1af0aff17324e |
|
BLAKE2b-256 | 8b5bcb495fde5c3ce5a0169069c8097a731afc5c740ee4544e0e04a5a47b0287 |
Close
Hashes for layerborn.cdk_git_tagger-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81be4e1637dbb4c71c9515d054997c6054137b23cb248ec6da48cbf29127bf3f |
|
MD5 | 9802cf91a6b25e95d328af3fb015a8f2 |
|
BLAKE2b-256 | e53d6438af65ff038a2630284bf31e1c4571d8ad29035df2e8062fa16c16b011 |