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.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a9ad344644a9273d500f9b0e6dff8ee56cdacc7aa56b81ff34085d1d96971a9 |
|
MD5 | 12106486f2dc902a76247285fb4fb50a |
|
BLAKE2b-256 | 1b136421c07a9eb2af3a421c38ccd7d1f1977a790a6a57edc8873558e6cd1789 |
Close
Hashes for layerborn.cdk_git_tagger-0.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75f9076ec8ef4c4917baccf61ed7f8a2fa243689dc3d9eb83c7d3c3f86bb836c |
|
MD5 | 4b3d3211ede3ce79d6cbd5ec16bc868c |
|
BLAKE2b-256 | f911ac70b9e09c95fa0a9bc9035558200d59a69e4ec9bdf4da0172035d7fed7f |