github.com/jmbataller/terraform@v0.6.8-0.20151125192640-b7a12e3a580c/website/source/docs/providers/aws/r/eip.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_eip"
     4  sidebar_current: "docs-aws-resource-eip"
     5  description: |-
     6    Provides an Elastic IP resource.
     7  ---
     8  
     9  # aws\_eip
    10  
    11  Provides an Elastic IP resource.
    12  
    13  ## Example Usage
    14  
    15  ```
    16  resource "aws_eip" "lb" {
    17      instance = "${aws_instance.web.id}"
    18      vpc = true
    19  }
    20  ```
    21  
    22  ## Argument Reference
    23  
    24  The following arguments are supported:
    25  
    26  * `vpc` - (Optional) Boolean if the EIP is in a VPC or not.
    27  * `instance` - (Optional) EC2 instance ID.
    28  * `network_interface` - (Optional) Network interface ID to associate with.
    29  
    30  ~> **NOTE:** You can specify either the `instance` ID or the `network_interface` ID, 
    31  but not both. Including both will **not** return an error from the AWS API, but will
    32  have undefined behavior. See the relevant [AssociateAddress API Call][1] for
    33  more information.
    34  
    35  ## Attributes Reference
    36  
    37  The following attributes are exported:
    38  
    39  * `private_ip` - Contains the private IP address (if in VPC).
    40  * `public_ip` - Contains the public IP address.
    41  * `instance` - Contains the ID of the attached instance.
    42  * `network_interface` - Contains the ID of the attached network interface.
    43  
    44  
    45  [1]: http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AssociateAddress.html