Closed nosnilmot closed 6 days ago
Another variant of the same problem reports as E1017
(this is closer to what I distilled to the original reproducer but I didn't notice the error number changed):
E1017 'Idx' is not one of ['Idx'] for mapping 'Map' and key 'Key'
mapv.yaml:25:13
AWSTemplateFormatVersion: '2010-09-09'
Parameters:
CidrBlock:
Type: String
Default: "192.168.0.0/24"
Ipv6CidrList:
Type: CommaDelimitedList
Default: ""
Mappings:
Map:
Key:
Idx: 0
Resources:
VPC:
Type: AWS::EC2::VPC
Properties:
CidrBlock: !Ref CidrBlock
Subnet:
Type: AWS::EC2::Subnet
Properties:
Ipv6CidrBlock: !Select
- !FindInMap
- Map
- Key
- Idx
- !Ref Ipv6CidrList
VpcId: !Ref 'VPC'
Another FindInMap
problem (do you need a separate issue for this?)
cfn-lint
1.3.0-1.3.5 do not report any problem with this template that is completely missing the map RegionMap
AWSTemplateFormatVersion: '2010-09-09'
Resources:
VPC:
Type: AWS::EC2::VPC
Properties:
CidrBlock: !FindInMap
- RegionMap
- !Ref 'AWS::Region'
- Key
CloudFormation Lint Version
1.3.5
What operating system are you using?
Mac
Describe the bug
Thanks for fixing #3385
Now
cfn-lint
incorrectly complains about missing keys if the resolved value is falsy (0 or "")Expected behavior
no errors or warnings
Reproduction template