Skip to content

Serverless::Function does not propagate its tags to the generated IAM::Role resource #1160

@kgeisink

Description

@kgeisink

Description:

I am using cfn-python-lint with a custom validation rule to make sure that all resources which are taggable have the Tags property defined. When validating a template with an AWS::Serverless::Function resource (for example named MakeCoffee), the CloudFormation linter fails with the error 'Missing Tags Properties for Resources/MakeCoffeeRole/Properties'.

IAM::Role has only been taggable since August 29th, so I don't know whether this counts as a bug or a feature.

Steps to reproduce the issue:

  1. Define a Serverless::Function resource with a Tags property in a template.
  2. Deploy the template.

Edit: Just found out this is also reproducible by specifying a DeploymentPreference, as the generated CodeDeployServiceRole does not have tags either.

Observed result:

Generated IAM::Role is not tagged.

Expected result:

Generated IAM::Role should be tagged.

Additional information:

I found this related issue which solved the same problem for the ApiGateway::Stage resource generated from Serverless::Api: #384

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions