providers/aws: source_dest_check applies [GH-229]

This commit is contained in:
Mitchell Hashimoto 2014-08-26 15:05:36 -07:00
parent 660667957e
commit b7e16c6b53
1 changed files with 3 additions and 12 deletions

View File

@ -15,16 +15,6 @@ import (
"github.com/mitchellh/goamz/ec2"
)
/*
PreProcess: map[string]diff.PreProcessFunc{
"user_data": func(v string) string {
hash := sha1.Sum([]byte(v))
return hex.EncodeToString(hash[:])
},
},
}
*/
func resourceAwsInstance() *schema.Resource {
return &schema.Resource{
Create: resourceAwsInstanceCreate,
@ -226,9 +216,10 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error {
modify := false
opts := new(ec2.ModifyInstance)
if d.HasChange("source_dest_check") {
opts.SourceDestCheck = d.Get("source_dest_check").(bool)
if v, ok := d.GetOk("source_dest_check"); ok {
opts.SourceDestCheck = v.(bool)
opts.SetSourceDestCheck = true
modify = true
}
if modify {