Skip to content

(cli): Hotswap support for resource tags #17664

@offbyone

Description

@offbyone

Description

I would like hotswap to modify resource tags in-place rather than triggering a full stack changeset. Assuming a diff like this:

cdk diff mystack
Including dependency stacks: mystack-Data
Stack mystack-Data
There were no differences
Stack mystack
Resources
[~] AWS::Lambda::Function MyApp MyAppE55F03CE
 ├─ [~] Code
 │   └─ [~] .S3Key:
 │       ├─ [-] local_development_resourcesd5d9014617720b099ab57419bf3bfb4beb0db64d0290ea1693040723b4489f1c
 │       └─ [+] local_development_resources008d8f94dad3437e716aef4e7280656cee4106115ad42f6aafc94b9e14108397
 └─ [~] Tags
     └─ @@ -5,6 +5,6 @@
        [ ]   },
        [ ]   {
        [ ]     "Key": "tagName",
        [-]     "Value": "local_development_resourcesd5d9014617720b099ab57419bf3bfb4beb0db64d0290ea1693040723b4489f1c"
        [+]     "Value": "local_development_resources008d8f94dad3437e716aef4e7280656cee4106115ad42f6aafc94b9e14108397"
        [ ]   }
        [ ] ]

This delta should be safe to hotswap, but because there is a tag change, it does not.

Use Case

My stack assets infer tag values from asset hashes, and I would still like to be able to hotswap without having to have a separate code path for hotswapped assets.

Proposed Solution

Include the Tags in values that are hotswappable, across all resource types.

Other information

No response

Acknowledge

  • I may be able to implement this feature request
  • This feature might incur a breaking change

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumMedium work item – several days of effortfeature-requestA feature should be added or improved.p1package/toolsRelated to AWS CDK Tools or CLI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions