Closed cbernander closed 1 week ago
1.3.4
Ubuntu
Validation fails when using AWS::NoValue to conditionally set a property that is of Array of X type:
AWS::NoValue
E3012 'AWS::NoValue' is not of type 'array'
Validation should pass.
AWSTemplateFormatVersion: 2010-09-09 Parameters: UseAliases: Default: false Type: String AllowedValues: [true, false] Conditions: ShouldUseAliases: !Equals [true, !Ref UseAliases] Resources: CloudFrontDistribution: Type: "AWS::CloudFront::Distribution" Properties: DistributionConfig: Aliases: !If - ShouldUseAliases - - "{{resolve:ssm:/env/fqdns/certifier}}" - AWS::NoValue DefaultCacheBehavior: AllowedMethods: - "GET" - "HEAD" CachedMethods: - "GET" - "HEAD" ForwardedValues: QueryString: true TargetOriginId: "s3" ViewerProtocolPolicy: "https-only" Enabled: true Origins: - Id: "s3" DomainName: www.example.com.s3.amazonaws.com"
Shouldn't that be !Ref AWS::NoValue?
!Ref AWS::NoValue
Yes, of course you are correct - this was an uncaught bug on our side.
CloudFormation Lint Version
1.3.4
What operating system are you using?
Ubuntu
Describe the bug
Validation fails when using
AWS::NoValue
to conditionally set a property that is of Array of X type:E3012 'AWS::NoValue' is not of type 'array'
Expected behavior
Validation should pass.
Reproduction template