manheim/cf_deployer

Update does not update stack tags

Closed this issue · 4 comments

I ran across some unexpected behavior while trying to update a stack's tags. I updated my configuration, ran the deploy and received back the message No updates are to be performed.

I had expected cf_deployer to send the new tags to the stack and perform an update.

The update_stack method on the Stack object does does not merge tags in to the call arguments.

The create_stack method on the Stack object does merge in the tags.

Looking at the SDK docs it appears that the API call supports updating tags.

Is there a reason the tool does not support updating tags?

I don't have the full context on this, but I can make a guess...

The original code for this project was written in 2014.

According to the archive.org Wayback Machine snapshot of the CloudFormation UpdateStack docs from November 2014, UpdateStack didn't originally support updating tags.

The "Tags" argument on UpdateStack doesn't show up in archive.org snapshots of the docs until sometime between September 2015 and July 2016 (back then AWS didn't maintain any versioning of docs/changelogs/etc.).

If I had to guess, the ability to update tags was added around the same time as CloudFormation Change Sets were announced in March 2016.

All of that being said, while the docs don't seem to have been updated accordingly, this gem has been considered deprecated for quite a few years, and usage is certainly tailing off. To my knowledge, most internal teams that were using cf_deployer are now using either Elastic Beanstalk (either with https://github.com/ThoughtWorksStudios/eb_deployer or a similar tool) or Terraform.

To confirm my suspicion, as I detailed in #55, the gemspec for this project lists an aws-sdk dependency of 1.44.0, but support for CF stack tagging wasn't introduced until 2.2.20.

Great information. Thank you for taking such care in evaluating the issue!

The team has decided that we are going to work around this problem by using the CLI to update our stack's tags. We no longer need the feature described in this issue.

Thank you very much!