You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This should work and is a bug in cfn-lint. Oddly enough !Select [ 1 , !GetAtt ElasticacheRedis.ReadEndPoint.Addresses ] fails with Template error: Fn::Select requires a list argument with two elements: an integer index and a list
Even though that attribute is an array of strings its combined on the GetAtt to a string with spaces and a comma and brackets.
CloudFormation Lint Version
v1.11.0
What operating system are you using?
Windows
Describe the bug
Below is the yaml I am using for CLoudwatch alarm
Type: AWS::CloudWatch::Alarm
DependsOn: ElasticacheRedis
Properties:
Dimensions:
- Name: CacheClusterId
Value: !Select [ 0, !Split [ "." , !Select [ 1, !Split [ "[", !Select [ 0, !Split [ " " , !GetAtt ElasticacheRedis.ReadEndPoint.Addresses ] ] ] ] ] ]
cfn-lint throws an error that
E1017 {'Fn::GetAtt': ['ElasticacheRedis', 'ReadEndPoint.Addresses']} is not of type 'string'
I am sure this was working a while back
Note: I have trimmed the content and just left the problematic line
Expected behavior
There should not be any lint errors
Reproduction template
Type: AWS::CloudWatch::Alarm
DependsOn: ElasticacheRedis
Properties:
Dimensions:
- Name: CacheClusterId
Value: !Select [ 0, !Split [ "." , !Select [ 1, !Split [ "[", !Select [ 0, !Split [ " " , !GetAtt ElasticacheRedis.ReadEndPoint.Addresses ] ] ] ] ] ]
The text was updated successfully, but these errors were encountered: