diff --git a/aws/resource_aws_instance.go b/aws/resource_aws_instance.go index 83f2f35a1f6..c7764723fae 100644 --- a/aws/resource_aws_instance.go +++ b/aws/resource_aws_instance.go @@ -718,7 +718,7 @@ func resourceAwsInstanceRead(d *schema.ResourceData, meta interface{}) error { if err != nil { return err } - if attr.UserData.Value != nil { + if attr.UserData != nil && attr.UserData.Value != nil { d.Set("user_data", userDataHashSum(*attr.UserData.Value)) } }