package ec2

import (
	"github.com/jagregory/cfval/resources/common"
	. "github.com/jagregory/cfval/schema"
)

// see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-internet-gateway.html
func InternetGateway() Resource {
	return Resource{
		AwsType: "AWS::EC2::InternetGateway",

		// Name -- not sure about this. Docs say Name, but my testing we can Ref
		//         this into an InternetGatewayId property successfully.
		ReturnValue: Schema{
			Type: InternetGatewayID,
		},

		Properties: Properties{
			"Tags": Schema{
				Type:  common.ResourceTag,
				Array: true,
			},
		},
	}
}

package ec2

import (
	"github.com/jagregory/cfval/resources/common"
	. "github.com/jagregory/cfval/schema"
)

// see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-internet-gateway.html
func InternetGateway() Resource {
	return Resource{
		AwsType: "AWS::EC2::InternetGateway",

		// Name
		ReturnValue: Schema{
			Type: ValueString,
		},

		Properties: Properties{
			"Tags": Schema{
				Type:  common.ResourceTag,
				Array: true,
			},
		},
	}
}

--- 
+++ 
@@ -10,9 +10,10 @@
 	return Resource{
 		AwsType: "AWS::EC2::InternetGateway",
 
-		// Name
+		// Name -- not sure about this. Docs say Name, but my testing we can Ref
+		//         this into an InternetGatewayId property successfully.
 		ReturnValue: Schema{
-			Type: ValueString,
+			Type: InternetGatewayID,
 		},
 
 		Properties: Properties{
Change Ref value of Internet Gateway to an ID despite what the docs say
