providers/aws: fix aws_instance source_dest_check

Was relying on old behavior of GetOk and therefore never properly seeing
a change from true -> false.

This fixes the acceptance test failure of
`TestAccAWSInstance_sourceDestCheck`.
This commit is contained in:
Paul Hinze 2015-02-18 17:46:50 -06:00
parent 706243c587
commit 3c4d1791e5
1 changed files with 2 additions and 2 deletions

View File

@ -491,9 +491,9 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error {
modify := false
opts := new(ec2.ModifyInstance)
if v, ok := d.GetOk("source_dest_check"); ok {
opts.SourceDestCheck = v.(bool)
if d.HasChange("source_dest_check") {
opts.SetSourceDestCheck = true
opts.SourceDestCheck = d.Get("source_dest_check").(bool)
modify = true
}