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.11.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1963968409e2ff9f5ebbf46c86672e985567e51eba2c58912cc05cbdccbddf5 |
|
MD5 | c85cf11447460c17bd382ceadc95f80e |
|
BLAKE2b-256 | 8513182a6068cd6cd2d4d977042986bfa48dc0443e5b7ec8aa77f9a84d5c16d5 |
Close
Hashes for layerborn.cdk_git_tagger-0.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 332ac2b5f78f6dd8fb32dfa2aa32d89551bb934c639708928d7a0fdbd2178b22 |
|
MD5 | 71abbd74c6db8147f6a68ef31f584c4e |
|
BLAKE2b-256 | ec1b32c19bd3f8d1e6106d2aa370528e615c723606b7cc9fe3d15f8262cad96a |