Merge pull request #3036 from hashicorp/b-aws-eip-computed-instance

provider/aws: Allow Instance to be computed in EIPs
This commit is contained in:
Clint 2015-10-08 09:38:26 -05:00
commit 4962ef159b
2 changed files with 11 additions and 4 deletions

View File

@ -30,13 +30,13 @@ func resourceAwsEip() *schema.Resource {
"instance": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Computed: true,
},
"network_interface": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Computed: true,
ConflictsWith: []string{"instance"},
Type: schema.TypeString,
Optional: true,
Computed: true,
},
"allocation_id": &schema.Schema{

View File

@ -27,6 +27,11 @@ The following arguments are supported:
* `instance` - (Optional) EC2 instance ID.
* `network_interface` - (Optional) Network interface ID to associate with.
~> **NOTE:** You can specify either the `instance` ID or the `network_interface` ID,
but not both. Including both will **not** return an error from the AWS API, but will
have undefined behavior. See the relevant [AssociateAddress API Call][1] for
more information.
## Attributes Reference
The following attributes are exported:
@ -36,3 +41,5 @@ The following attributes are exported:
* `instance` - Contains the ID of the attached instance.
* `network_interface` - Contains the ID of the attached network interface.
[1]: http://docs.aws.amazon.com/fr_fr/AWSEC2/latest/APIReference/API_AssociateAddress.html