github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/aws/r/network_interface.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_network_interface"
     4  sidebar_current: "docs-aws-resource-network-interface"
     5  description: |-
     6    Provides an Elastic network interface (ENI) resource.
     7  ---
     8  
     9  # aws\_network\_interface
    10  
    11  Provides an Elastic network interface (ENI) resource.
    12  
    13  ## Example Usage
    14  
    15  ```hcl
    16  resource "aws_network_interface" "test" {
    17    subnet_id       = "${aws_subnet.public_a.id}"
    18    private_ips     = ["10.0.0.50"]
    19    security_groups = ["${aws_security_group.web.id}"]
    20  
    21    attachment {
    22      instance     = "${aws_instance.test.id}"
    23      device_index = 1
    24    }
    25  }
    26  ```
    27  
    28  ## Argument Reference
    29  
    30  The following arguments are supported:
    31  
    32  * `subnet_id` - (Required) Subnet ID to create the ENI in.
    33  * `description` - (Optional) A description for the network interface.
    34  * `private_ips` - (Optional) List of private IPs to assign to the ENI.
    35  * `private_ips_count` - (Optional) Number of private IPs to assign to the ENI.
    36  * `security_groups` - (Optional) List of security group IDs to assign to the ENI.
    37  * `attachment` - (Optional) Block to define the attachment of the ENI. Documented below.
    38  * `source_dest_check` - (Optional) Whether to enable source destination checking for the ENI. Default true.
    39  * `tags` - (Optional) A mapping of tags to assign to the resource.
    40  
    41  The `attachment` block supports:
    42  
    43  * `instance` - (Required) ID of the instance to attach to.
    44  * `device_index` - (Required) Integer to define the devices index.
    45  
    46  ## Attributes Reference
    47  
    48  The following attributes are exported:
    49  
    50  * `subnet_id` - Subnet ID the ENI is in.
    51  * `description` - A description for the network interface.
    52  * `private_ips` - List of private IPs assigned to the ENI.
    53  * `security_groups` - List of security groups attached to the ENI.
    54  * `attachment` - Block defining the attachment of the ENI.
    55  * `source_dest_check` - Whether source destination checking is enabled
    56  * `tags` - Tags assigned to the ENI.
    57  
    58  
    59  
    60  ## Import
    61  
    62  Network Interfaces can be imported using the `id`, e.g.
    63  
    64  ```
    65  $ terraform import aws_network_interface.test eni-e5aa89a3
    66  ```