| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Describes a network interface in an Elastic Compute Cloud (EC2) instance for AWS CloudFormation. This is provided in a list in the NetworkInterfaces property of AWS::EC2::Instance.
{
"Type" : "AWS::EC2::NetworkInterface",
"Properties" : {
"Description": String,
"GroupSet": [ String ],
"PrivateIpAddress": String,
"SourceDestCheck": Boolean,
"SubnetId": String,
"Tags": [ EC2 Tags, ...],
}
}
The description of this network interface.
Required: No.
Type: String.
Update requires: no interruption
A list of security group IDs associated with this network interface.
Required: No.
Type: String..
Update requires: no interruption
IP address of the interface within the subnet.
Required: No.
Type: String.
Update requires: replacement
Flag indicating whether traffic to or from the instance is validated.
Required: No.
Type: Boolean.
Update requires: no interruption
The ID of the subnet to associate with the network interface.
Required: Yes.
Type: String.
Update requires: replacement
A list of tags associated with this network interface.
Required: No.
Type: List of EC2 Tag.
Update requires: no interruption
When the logical ID of this resource is provided to the Ref intrinsic
function, it returns the resource name.
For more information about using the Ref function, see Ref.
Tip
For more NetworkInterface template examples, see Elastic Network Interface (ENI) Template Snippets.
This is a simple stand-alone Elastic Network Interface (ENI), using all of the available properties.
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "Simple Standalone ENI",
"Resources" : {
"myENI" : {
"Type" : "AWS::EC2::NetworkInterface",
"Properties" : {
"Tags": [{"Key":"foo","Value":"bar"}],
"Description": "A nice description.",
"SourceDestCheck": "false",
"GroupSet": ["sg-75zzz219"],
"SubnetId": "subnet-3z648z53",
"PrivateIpAddress": "10.0.0.16"
}
}
}
} This is an example of an ENI on an EC2 instance. In this example, one ENI is added to the instance, but since NetworkInterfaces is a list, you can add more than one.
"Ec2Instance" : {
"Type" : "AWS::EC2::Instance",
"Properties" : {
"ImageId" : { "Fn::FindInMap" : [ "RegionMap", { "Ref" : "AWS::Region" }, "AMI" ]},
"KeyName" : { "Ref" : "KeyName" },
"SecurityGroupIds" : [{ "Ref" : "WebSecurityGroup" }],
"SubnetId" : { "Ref" : "SubnetId" },
"NetworkInterfaces" : [ {
"NetworkInterfaceId" : {"Ref" : "controlXface"}, "DeviceIndex" : "1" } ],
"Tags" : [ {"Key" : "Role", "Value" : "Test Instance"}],
"UserData" : { "Fn::Base64" : { "Ref" : "WebServerPort" }}
}
} NetworkInterfaceType in the Amazon Elastic Compute Cloud API Reference