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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cb53a4e71f18460f7d2ee5a230f8fa9951449b2170a734dadbbe222ee8674ea |
|
MD5 | f001d6aa775b7fcf491eede65866a936 |
|
BLAKE2b-256 | e3af744b0c2eb2291a6cd3041e9cd2aeccb7720f4a62367d3a5af5f457805bf3 |
Close
Hashes for layerborn.cdk_git_tagger-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a122b7d6cbd26873f471ac39a89d838be64af3ea9d16f02854c8b54200cafe3e |
|
MD5 | 9fe66fc81103d4de1920ebe51e170cee |
|
BLAKE2b-256 | ff1c5cc00f62cd457bac8cc950148cf59c0c2e2a9576563d692bfde6df7e7bdb |