Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS CloudFormation Incorrect Tag Validation for AWS::Serverless::HttpApi Resources in cfn-lint 1.4.0 #3436

Closed
aashishshrestha09 opened this issue Jun 27, 2024 · 2 comments · Fixed by #3437

Comments

@aashishshrestha09
Copy link

aashishshrestha09 commented Jun 27, 2024

CloudFormation Lint Version

1.4.0

What operating system are you using?

Mac

Describe the bug

When using cfn-lint version 1.4.0 to validate a CloudFormation template (template.yml) that includes tags for an AWS::Serverless::HttpApi resource, an error (E3012) is encountered. This error persists even when the tags are provided in what should be a valid format according to AWS CloudFormation specifications.

Error Message: The error message (E3012) suggests that cfn-lint is not accepting the provided tag format, even though it conforms to AWS CloudFormation's requirements.

E3012 {'Environment': 'Production', 'httpapi:createdBy': 'SAM'} is not of type 'array'

Reproduction template

---
AWSTemplateFormatVersion: '2010-09-09'
Resources:
  MyHttpApi:
    Type: AWS::Serverless::HttpApi
    Properties:
      StageName: Prod
      Tags:
        Environment: Production
@kddejong
Copy link
Contributor

translated

"MyHttpApiProdStage": {
   "Properties": {
    "ApiId": {
     "Ref": "MyHttpApi"
    },
    "AutoDeploy": true,
    "StageName": "Prod",
    "Tags": {
     "Environment": "Production",
     "httpapi:createdBy": "SAM"
    }
   },
   "Type": "AWS::ApiGatewayV2::Stage"
  }

@kddejong
Copy link
Contributor

Similar to #3434. Working on a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants