Can't assign tags to stack
I have been trying to include tags for my CF stack template but I'm failing. No error is coming at all. I just doesn't appear at all. I followed the format in action.yml file:
tags: description: 'Key-value pairs to associate with this stack. This input should be JSON-formatted, for example [ { "Key": "string", "Value": "string" } ]' required: false
But it's not doing any affect at all. Here is my yaml file
- name: Deploy API Gateway Setup if: github.ref == 'refs/heads/main' id: My-api-gateway uses: aws-actions/aws-cloudformation-github-deploy@v1 with: name: My-Infra-API-GW template: Infrastructure/eu-west-1/API-GW/api-gw-setup.yaml role-arn: arn:aws:iam::1234567890:role/GitHub-Role no-fail-on-empty-changeset: "1" tags: > '[ { "Key": "Product", "Value": "Infrastructure" }, { "Key": "Environment", "Value": "AWS" }, { "Key": "CreatedBy", "Value": "GitHubActions" } ]'
I have the same issue. I have also tried with the same format as parameter-overrides.
FWIW, I ran into semi-similar issue in using the CDK and was able to do:
for (const [key, value] of Object.entries(TAGS)) {
Tags.of(this).add(key, value)
}
to the stack resource and that resolved my issue. Not sure that's applicable here but figured I'd toss this suggestion out