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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | aad81de1047174c4525273ca38e646bd1489b1b717490e1005e176072115885e |
|
MD5 | fd170fac91ae830f93b23a2913bbca5b |
|
BLAKE2b-256 | a2b091c469222adf5e22c3a3c32e4ee46bcd75ac4dc6eac5de32b65303913d25 |
Close
Hashes for layerborn.cdk_git_tagger-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5e33f2239e277b50b13af25938cbe9a9f8e228677e8cd1aa090600a9b534964 |
|
MD5 | fa7287005727ba489281a4b0761e4ed3 |
|
BLAKE2b-256 | 1e62a3b3a443369502f84e1a697fab29ded0d36038dd9b6298a83288a40d7562 |