providers/aws: check if instance is set on eip

This commit is contained in:
Mitchell Hashimoto 2014-09-09 14:15:08 -07:00
parent a5c884f5aa
commit a5b85dd788
2 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@ BUG FIXES:
* core: "~" is expanded in `-var-file` flags. [GH-273]
* core: Errors with tfvars are shown in console. [GH-269]
* providers/aws: Refreshing EIP from pre-0.2 state file won't error. [GH-258]
* providers/aws: Creating EIP without an instance/network won't fail.
* providers/digitalocean: Handle situations when resource was destroyed
manually. [GH-279]
* providers/digitalocean: Fix a couple scenarios where the diff was

View File

@ -97,7 +97,7 @@ func resourceAwsEipUpdate(d *schema.ResourceData, meta interface{}) error {
domain := resourceAwsEipDomain(d)
// Only register with an instance if we have one
if v := d.Get("instance"); v != nil {
if v, ok := d.GetOk("instance"); ok {
instanceId := v.(string)
assocOpts := ec2.AssociateAddress{