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.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e627742d0ff3023e1ed71f767f2b5af1be0c73f9c2e8e1139e6bcd6a7d45cd7 |
|
MD5 | 86dee206c332ea93be8112465a8f3902 |
|
BLAKE2b-256 | b0a26014e69651709f459f0cf50e66ba663b25af51c6a2bbb5765098e10933a0 |
Close
Hashes for layerborn.cdk_git_tagger-0.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efe78b5fa6865b755ef96d85ee0b3340db972b539dcaa934ffc4a7fac9ec773a |
|
MD5 | 0607035cc4f6c8dd7981b88528c1f0a3 |
|
BLAKE2b-256 | a9e6eeb92a42e1cfa10a217589db038b840f9a06ea52d0aa8aff9b7651006abd |