cloudcomponents / cdk-constructs

A collection of higher-level reusable cdk constructs
MIT License
625 stars 104 forks source link

Tag cdk-blue-green-container resources #141

Closed rogperez closed 2 years ago

rogperez commented 2 years ago

Resolved Issue: #132

Using TagManager and the ITaggable interface, we are able to tag or untag resources using default CDK tagging behaviors.

rogperez commented 2 years ago

There are a lot of tests and fixtures related to this change. I've added tests to the handlers in both the ecs-create-service and ecs-deployment-group lambdas that made implementing the logic around tagging/untagging much easier. Also, the arnForDeploymentGroup cdk function was moved into the custom-resource's lambda itself by extracting parts from the ARN directly from the invoking function, and fetching the Arn by using the getAttrString of the lambda's response.