diff --git a/builtin/providers/aws/resource_aws_instance.go b/builtin/providers/aws/resource_aws_instance.go index 0db83a2d376f..8cf300bdc609 100644 --- a/builtin/providers/aws/resource_aws_instance.go +++ b/builtin/providers/aws/resource_aws_instance.go @@ -1,6 +1,8 @@ package aws import ( + "crypto/sha1" + "encoding/hex" "fmt" "log" "strings" @@ -84,7 +86,10 @@ func resourceAwsInstance() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, - // TODO: Process + StateFunc: func(v interface{}) string { + hash := sha1.Sum([]byte(v.(string))) + return hex.EncodeToString(hash[:]) + }, }, "security_groups": &schema.Schema{