title: Getting "Template validation error: Invalid template resource property 'VPCID' "
body: <p>I am trying to create a VPC using AWS CloudFormation.</p>
  <p>I built a VPC on its own, then I updated the existing stack by adding more components to the JSON template (components like subnets, internet gateways, NATs, route tables, etc.) - one component at a time.</p>
  <p>My VPC created successfully but when I tried to update the stack with an internet gateway and attach to the VPC, I started getting the error <code>Template validation error: Invalid template resource property 'VPCID'</code>.</p>
  <p>My JSON template is as follows:</p>
  <pre><code>{
  &quot;Parameters&quot;: {  
     &quot;CIDRRange&quot;: { 
       &quot;Description&quot;: &quot;VPCCIDR Range (will be a /16 block)&quot;,
       &quot;Type&quot;: &quot;String&quot;,
       &quot;Default&quot;: &quot;10.251.0.0&quot;,
       &quot;AllowedValues&quot;: [&quot;10.250.0.0&quot;,&quot;10.251.0.0&quot;]
                  } 
                }, 
  
  &quot;Resources&quot;: { 
     &quot;VPCBase&quot;: { 
       &quot;Type&quot;: &quot;AWS::EC2::VPC&quot;,
       &quot;Properties&quot;: { 
       &quot;CidrBlock&quot;: { &quot;Fn::Join&quot; : [&quot;&quot;, [{ &quot;Ref&quot; : &quot;CIDRRange&quot; }, &quot;/16&quot;]] },
       &quot;EnableDnsSupport&quot;: &quot;True&quot;,
       &quot;EnableDnsHostnames&quot;: &quot;True&quot;,
       &quot;Tags&quot;: [{ &quot;Key&quot;: &quot;Name&quot;, &quot;Value&quot;:    { &quot;Fn::Join&quot; : [&quot;&quot;, [{ &quot;Ref&quot; : &quot;AWS::StackName&quot; }, &quot;-VPC&quot;]] } }]
                     }
                 },
               
     &quot;IGWBase&quot; : {
       &quot;Type&quot; : &quot;AWS::EC2::InternetGateway&quot;,
       &quot;Properties&quot; : {
       &quot;Tags&quot; : [{ &quot;Key&quot;: &quot;Name&quot;, &quot;Value&quot;: { &quot;Fn::Join&quot; : [&quot;&quot;, [{ &quot;Ref&quot; : &quot;AWS::StackName&quot; }, &quot;-IGW&quot;]] } }]
                      }
                 },
  
     &quot;VGAIGWBase&quot; : {
       &quot;Type&quot; : &quot;AWS::EC2::VPCGatewayAttachment&quot;,
       &quot;Properties&quot; : {
       &quot;InternetGatewayId&quot; : { &quot;Ref&quot; : &quot;IGWBase&quot; },
       &quot;VpcId&quot; : { &quot;Ref&quot; : &quot;VPCBase&quot; }}
                    },
  
     &quot;Outputs&quot;: {
       &quot;VPCID&quot; : { &quot;Value&quot; : { &quot;Ref&quot; : &quot;VPCBase&quot; } },
       &quot;DefaultSG&quot; : { &quot;Value&quot; : { &quot;Fn::GetAtt&quot; : [&quot;VPCBase&quot;, &quot;DefaultSecurityGroup&quot;] }}
                }
  }
  }
  </code></pre>