AWS::EC2::InternetGateway
Allocates an internet gateway for use with a VPC. After creating the Internet gateway, you then attach it to a VPC.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
Properties
Tags
-
Any tags to assign to the internet gateway.
Required: No
Type: List of Tag
Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref
function, Ref
returns the resource name.
For more information about using the Ref
function, see Ref.
Examples
Creating an Internet Gateway
The following example creates an Internet gateway and assigns it a tag.
JSON
"Resources" : { "myInternetGateway" : { "Type" : "AWS::EC2::InternetGateway", "Properties" : { "Tags" : [ {"Key" : "foo", "Value" : "bar"}] } } }
YAML
myInternetGateway: Type: AWS::EC2::InternetGateway Properties: Tags: - Key: foo Value: bar
See also
-
CreateInternetGateway in the Amazon EC2 API Reference
-
InternetGateways in the Amazon Virtual Private Cloud User Guide
-
Use the AWS::EC2::VPCGatewayAttachment resource to associate an Internet gateway with a VPC