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.14.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ff9764e84ee24449072a2d4a2b271187e5903c6ab07f61cb8bd49445c5fcddb |
|
MD5 | 60fa084dc99c38af1869276f12cb9e45 |
|
BLAKE2b-256 | fa284d6af79f6af856cfd9ef67a43601e662e915433b94d5589ae01f15a7bd12 |
Close
Hashes for layerborn.cdk_git_tagger-0.0.14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94aeedd7065cace9021a29da42c8cc438cb008628c69915a35b4794c049f7d76 |
|
MD5 | e5cfd6e1f03183471e82d8796f64601f |
|
BLAKE2b-256 | b72d9efe7cf18ad995863590f08615fc129142c671f3b833d0ff063ddf42494e |