- Implements: aws-cdk-lib.IAspect
An aspect that applies CloudFormation tags to all KMS keys in the given scope.
This is useful because KMS keys are not automatically tagged by CloudFormation, which makes them hard to track and manage.
import { ApplyKmsTags } from '@renovosolutions/cdk-aspects-library-tags'
new ApplyKmsTags()| Name | Type | Description |
|---|
| Name | Description |
|---|---|
visit |
Visits each construct in the scope and applies the tags if the construct is a KMS key. |
public visit(node: IConstruct): voidVisits each construct in the scope and applies the tags if the construct is a KMS key.
- Type: constructs.IConstruct
- Implements: aws-cdk-lib.IAspect
An aspect that applies a set of tags to all taggable resources in the given scope.
This aspect can be used to enforce consistent tagging across resources, which is useful for cost allocation, resource management, and compliance purposes.
import { ApplyTags } from '@renovosolutions/cdk-aspects-library-tags'
new ApplyTags(tags: {[ key: string ]: string})| Name | Type | Description |
|---|---|---|
tags |
{[ key: string ]: string} |
- a record of key-value pairs to apply as tags to taggable resources in the CDK app. |
- Type: {[ key: string ]: string}
a record of key-value pairs to apply as tags to taggable resources in the CDK app.
| Name | Description |
|---|---|
visit |
Visits each construct in the scope and applies the tags if the construct is taggable. |
public visit(node: IConstruct): voidVisits each construct in the scope and applies the tags if the construct is taggable.
- Type: constructs.IConstruct
the construct to visit.
| Name | Type | Description |
|---|---|---|
tags |
{[ key: string ]: string} |
A record of key-value pairs to apply as tags to taggable resources in the CDK app. |
public readonly tags: {[ key: string ]: string};- Type: {[ key: string ]: string}
A record of key-value pairs to apply as tags to taggable resources in the CDK app.