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.15.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7025f179e217c1a678e3cd6b10e0e32f49384efcc92f411f01ee11068193558 |
|
MD5 | 03cf85a027cfb1537b80770f69adb192 |
|
BLAKE2b-256 | f7a27c665de09f34092b52dd9234abba6f20ee3cde974e1b6cc9ee9bc2e539ee |
Close
Hashes for layerborn.cdk_git_tagger-0.0.15-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33a22726f88016c21dfcf0c24399fb2e9d085e481fe6926a6369faa0672c955d |
|
MD5 | 190122b1cf3251cbe80068a5bcf517da |
|
BLAKE2b-256 | 32195c63a07fbfd68305d8c4b760bb321e0de617ee05b5cd638726515df46962 |