martysweet / cfn-lint

A CloudFormation JSON and YAML Validator
MIT License
162 stars 38 forks source link

Validation fails for VpcEndpointType property of AWS::EC2::VPCEndpoint resource #220

Open aoggz opened 5 years ago

aoggz commented 5 years ago

cfn-lint does not accept the VpcEndpointType property on the AWS::EC2::VPCEndpoint resource. It expects VPCEndpointType. CloudFormation does not accept VPCEndpointType.

Here's the yaml for the resource currently at issue:

  SnsVpcEndpoint:
    Type: AWS::EC2::VPCEndpoint
    Properties:
      RouteTableIds:
        - !Ref RouteTableId
      ServiceName: !Join ['.', ['com.amazonaws', !Ref 'AWS::Region', 'sns']]
      VpcId: !Ref VpcId
      VpcEndpointType: Interface

Changing VpcEndpointType to VPCEndpointType will cause the CloudFormation stack to fail, but it will appease cfn-lint.

This was originally reported in #180.

martysweet commented 5 years ago

Hi @aoggz, thanks for the issue.

This appears to be an issue with the cloudformation specification provided by AWS.

https://d1uauaxba7bl26.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json

 "VPCEndpointType": {
          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcendpoint.html#cfn-ec2-vpcendpoint-vpcendpointtype",
          "PrimitiveType": "String",
          "Required": false,
          "UpdateType": "Immutable"
        },

I will raise this with AWS.

aoggz commented 5 years ago

Okay, cool. I did see that in the resource specification in this repository but wasn't sure how to approach. Thank you for the quick response!

PatMyron commented 4 years ago

AWS::EC2::VPCEndpoint is now available in the us-east-1 CloudFormation Resource Specification