amplify-cli icon indicating copy to clipboard operation
amplify-cli copied to clipboard

Amplify does not respect tags.json as per documentation

Open bfbenf opened this issue 2 years ago • 1 comments

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

v21.0.0

Amplify CLI Version

12.8.2

What operating system are you using?

Mac OSX

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

Nope

Describe the bug

The account I am trying to deploy into requires all stacks to have certain tags. According to the docs (https://docs.amplify.aws/javascript/tools/cli/project/tags/) before you run amplify init you can create a tags.json file in amplify/backend. When I have done this it still fails and checked in CloudTail and the tags are not being sent with the request.

Expected behavior

The tags should be added as part of the createStack call

Reproduction steps

create amplify/backend/tags.json run amplify init check cloudtrail

Project Identifier

No response

Log output

# Put your logs below this line


Additional information

No response

Before submitting, please confirm:

  • [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • [X] I have removed any sensitive information from my code snippets and submission.

bfbenf avatar Nov 17 '23 14:11 bfbenf

Hey @bfbenf, thank you for reporting this. I was able to reproduce the behaviour. Marking as bug. Note: after running init and modifying the backend/tags.json to add a custom tag and running push, the tags are being applied to the root stack on cloudformation. Additionally, tested by adding a function which created a nested stack also contained the custom tag.

ykethan avatar Nov 17 '23 15:11 ykethan