Skip to content

How to Add tags to all the resources that are being created #644

Answered by kichik
ismailcool5152 asked this question in Q&A
Discussion options

You must be logged in to vote

I don't think --tags is a parameter that cdk deploy accepts. Here is a basic example with TypeScript:

import * as cdk from 'aws-cdk-lib';
import { App, Stack } from 'aws-cdk-lib';
import { GitHubRunners } from '@cloudsnorkel/cdk-github-runners';

const app = new App();
const stack = new Stack(app, 'github-runners');
const runners = new GitHubRunners(stack, 'runners');
cdk.Tags.of(runner).add('mytag', 'myvalue');

app.synth();

More info about tags in CDK here https://docs.aws.amazon.com/cdk/v2/guide/tagging.html

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ismailcool5152
Comment options

@kichik
Comment options

Answer selected by kichik
@ismailcool5152
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants