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. Will create a .git-url-tagger.json file in the root of your project to store the git url. This file
will be used to determine the git url for the stack.
How to install
npm install @jjrawlins/cdk-git-tagger
or
yarn add @jjrawlins/cdk-git-tagger
How to use
import { GitUrlTagger } from '@jjrawlins/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/jjrawlins/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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jjrawlins_cdk_git_tagger-0.0.108.tar.gz.
File metadata
- Download URL: jjrawlins_cdk_git_tagger-0.0.108.tar.gz
- Upload date:
- Size: 33.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6ef39ddee581e651a8647581dafcea85c915c161bd7e7cee9cd3c1fb5409aa2
|
|
| MD5 |
3b4d595586bc8b8f5a23114119873c1f
|
|
| BLAKE2b-256 |
226ef9111448b44820d694ed8e14fa48097d46d07cf813b775ce41fd0109222d
|
File details
Details for the file jjrawlins_cdk_git_tagger-0.0.108-py3-none-any.whl.
File metadata
- Download URL: jjrawlins_cdk_git_tagger-0.0.108-py3-none-any.whl
- Upload date:
- Size: 32.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0fabcaa741ccaf221d2bd6c0543d09c17e808a04c2513f2e4623fc88e8ee1ac
|
|
| MD5 |
ce1a19d3b5b71ed94055be80c5953ec9
|
|
| BLAKE2b-256 |
b223288d04a4fc78005bc15074512878f7d5f136e7f2d76dc35ad5f355667e7d
|