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

E3601 - False-positive for AWS::StepFunctions::StateMachine StringMatches #3704

Closed
r-heimann opened this issue Sep 22, 2024 · 1 comment · Fixed by #3705
Closed

E3601 - False-positive for AWS::StepFunctions::StateMachine StringMatches #3704

r-heimann opened this issue Sep 22, 2024 · 1 comment · Fixed by #3705

Comments

@r-heimann
Copy link

CloudFormation Lint Version

cfn-lint 1.14.2

What operating system are you using?

Windows 11

Describe the bug

cfn-lint is unable to find "StringMatches" for "Choices". It gives the following error:

[cfn-lint] E3601: Only one of
[
  "And",
  "BooleanEquals",
  "BooleanEqualsPath",
  "IsBoolean",
  "IsNull",
  "IsNumeric",
  "IsPresent",
  "IsString",
  "IsTimestamp",
  "Not",
  "NumericEquals",
  "NumericEqualsPath",
  "NumericGreaterThan",
  "NumericGreaterThanPath",
  "NumericGreaterThanEquals",
  "NumericGreaterThanEqualsPath",
  "NumericLessThan",
  "NumericLessThanPath",
  "NumericLessThanEquals",
  "NumericLessThanEqualsPath",
  "Or",
  "StringEquals",
  "StringEqualsPath",
  "StringGreaterThan",
  "StringGreaterThanPath",
  "StringGreaterThanEquals",
  "StringGreaterThanEqualsPath",
  "StringLessThan",
  "StringLessThanPath",
  "StringLessThanEquals",
  "StringLessThanEqualsPath",
  "TimestampEquals",
  "TimestampEqualsPath",
  "TimestampGreaterThan",
  "TimestampGreaterThanPath",
  "TimestampGreaterThanEquals",
  "TimestampGreaterThanEqualsPath",
  "TimestampLessThan",
  "TimestampLessThanPath",
  "TimestampLessThanEquals",
  "TimestampLessThanEqualsPath",
]
is a required property

Expected behavior

cfn-lint allows the use of StringMatches

Reproduction template

AWSTemplateFormatVersion: 2010-09-09
Description: Test

Resources:
  StateMachine:
    Type: AWS::StepFunctions::StateMachine
    Properties:
      RoleArn: !GetAtt StepFunctionRole.Arn
      Definition:
        StartAt: Choice Test
        States:
          Choice Test:
            Type: Choice
            Choices:
              - Variable: $
                StringMatches: Test
                Next: Failed
            Default: Successful
          Successful:
            Type: Succeed
          Failed:
            Type: Fail
@r-heimann
Copy link
Author

Just wanted to note that i am able to deploy the CloudFormation Stack using StringMatches

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.

1 participant