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.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73411ccff3e7f8f9f5488bfb04f79e9a0104fbebce74c57eac7566c4be51159c |
|
MD5 | f958654d59d11a2cdb4a7cf040f0a4c1 |
|
BLAKE2b-256 | ae66a0729412683c15b49975c05ff35f8c97d97feafd631a42bcfc41ceef9435 |
Close
Hashes for layerborn.cdk_git_tagger-0.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb5f3b63ae7b39bd5f009e3891060dc2289a02e49d34cc8ee00937e44b166443 |
|
MD5 | 5fdfd3a8d360487ae9eef7a5e559b88a |
|
BLAKE2b-256 | 24d770ec4e1704f8f7555d524681e283d435d6075cf7a4b3b6ed6fbbafb33ec1 |