Jonathan Chapman
12/02/2021, 6:21 AMservice
, env
, and version
tags, but not finding a good way to default them. Any pointers?Frank
import * as cdk from "@aws-cdk/core";
cdk.Tags.of(this).add("service", "my-service");
Or only tag functions:
cdk.Tags.of(this).add("service", "my-service", {
includeResourceTypes: ["AWS:Lambda:Function"]
});
More details here: https://docs.aws.amazon.com/cdk/latest/guide/tagging.htmlSione
12/02/2021, 6:33 AMincludeResourceTypes
that I didn't know about.
cdk.Tags.of(app).add('env', app.stage)
cdk.Tags.of(app).add('service', app.name)
Frank
.of(app)
to tag all resources in the app.Jonathan Chapman
12/02/2021, 6:46 AM