Files
opentf/website/source/docs/providers/aws/r/network_interface.markdown
justnom aed17f8658 Fixing bugs with aws_network_interface and added docs.
When a user tried to create an `aws_network_interface` resource without specifying the `private_ips` or `security_groups` attributes the API call to AWS would fail with a 500 HTTP error. Length checks have been put in place for both of these attributes before they are added to the `ec2.CreateNetworkInterfaceInput` struct.

Documentation was also added for the `aws_network_interface` resource.
2015-06-04 11:44:33 -04:00

1.4 KiB

layout, page_title, sidebar_current, description
layout page_title sidebar_current description
aws AWS: aws_network_interface docs-aws-resource-network-interface Provides an Elastic network interface (ENI) resource.

aws_network_interface

Provides an Elastic network interface (ENI) resource.

Example Usage

resource "aws_network_interface" "test" {
    subnet_id = "${aws_subnet.public_a.id}"
	private_ips = ["10.0.0.50"]
	security_groups = ["${aws_security_group.web.name}"]
	attachment {
		instance = "${aws_instance.test.id}"
		device_index = 1
	}
}

Argument Reference

The following arguments are supported:

  • subnet_id - (Required) Subnet ID to create the ENI in.
  • private_ips - (Optional) List of private IPs to assign to the ENI.
  • security_groups - (Optional) List of security group IDs to assign to the ENI.
  • attachment - (Required) Block to define the attachment of the ENI. Documented below.
  • tags - (Optional) A mapping of tags to assign to the resource.

The attachment block supports:

  • instance - (Required) ID of the instance to attach to.
  • device_index - (Required) Integer to define the devices index.

Attributes Reference

The following attributes are exported:

  • subnet_id - Subnet ID the ENI is in.
  • private_ips - List of private IPs assigned to the ENI.
  • security_groups - List of security groups attached to the ENI.
  • attachment - Block defining the attachment of the ENI.
  • tags - Tags assigned to the ENI.