title: cloudformation Template format error: Every Resources object must contain a Type member
body: <p>Hi I hope someone can help tell me what I am doing wrong. I am writing a CF template that just adds a VPN Gateway to a VPC. No need to update routing tables etc. </p>
  
  <p>I am using the below template but I get an error that I can't quite see the problem, I thought an extra pair of eyes might help!
  :
  Template validation error: Template format error: Every Resources object must contain a Type member.</p>
  
  <p>Template:</p>
  
  <pre><code>{
  "AWSTemplateFormatVersion" : "2010-09-09",
  
  "Description" : "CF Just add a VPN Gateway to a VPC ",
  
  "Parameters" : {
  
  "targetVPCtoAttachGatewayTo"    : {
          "Description"   : "VPC ID to attach VPN Gateway",
          "Default"       : "vpc-xxxxx",
          "Type": "AWS::EC2::VPC::Id" 
      }
  },
  
  "Resources" : {
  
  "VPNGateway" : {
      "Type" : "AWS::EC2::VPNGateway",
      "Properties" : {
      "Type" : "ipsec.1",
      "Tags" : [
          {"Key": "Name", "Value": {"Fn::Join": ["",["Virtual Private Gateway for ", { "Ref": "targetVPCtoAttachGatewayTo"} ] ]}}]
      }
  },
  
  "AttachVpnGateway" : {
      "Type" : "AWS::EC2::VPCGatewayAttachment",
      "DependsOn" : "VPNGateway",
      "Properties" : {
      "VpcId" : { "Ref" : "targetVPCtoAttachGatewayTo" },
      "VpnGatewayId" : { "Ref" : "VPNGateway" }
      }
  },
  
  "Outputs" : {
  }}}
  </code></pre>