providers/aws: use GetOk to check for value [GH-258]
This commit is contained in:
parent
cc1bf78850
commit
ab5e07a1f9
|
@ -10,6 +10,7 @@ IMPROVEMENTS:
|
|||
BUG FIXES:
|
||||
|
||||
* core: Fix certain syntax of configuration that could cause hang. [GH-261]
|
||||
* providers/aws: Refreshing EIP from pre-0.2 state file won't error. [GH-258]
|
||||
* providers/google: Attaching a disk source (not an image) works
|
||||
properly. [GH-254]
|
||||
|
||||
|
|
|
@ -185,7 +185,7 @@ func resourceAwsEipRead(d *schema.ResourceData, meta interface{}) error {
|
|||
}
|
||||
|
||||
func resourceAwsEipDomain(d *schema.ResourceData) string {
|
||||
if v := d.Get("domain"); v != nil {
|
||||
if v, ok := d.GetOk("domain"); ok {
|
||||
return v.(string)
|
||||
} else if strings.Contains(d.Id(), "eipalloc") {
|
||||
// We have to do this for backwards compatibility since TF 0.1
|
||||
|
|
Loading…
Reference in New Issue