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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f12adcb020b3637b3f3cd29492307e12021fa4c2640b8cbfe00517ed01ae162 |
|
MD5 | be8824bd78891f5a765ddbbbcbf1447a |
|
BLAKE2b-256 | 505e7653d9f515eab0b8c3664e4f5aff21972a4d8c596eccde059566452a588a |
Close
Hashes for layerborn.cdk_git_tagger-0.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1c092edb59b34872c3f61ddc3df030d2caa30c182b442515427fd827d0678b5 |
|
MD5 | 273e62d7eb0b7deb14d7c4eef5a52096 |
|
BLAKE2b-256 | 078995f58480f98f1a2ef2fdedc0d27f32aa664ab9df287423a4f06930600928 |