Skip to content

Commit

Permalink
Merge pull request #4941 from ivanpedersen/master
Browse files Browse the repository at this point in the history
Don't update disable_api_termination on new resource
  • Loading branch information
bflad authored Jun 22, 2018
2 parents 4e5f6d2 + 48e87a2 commit 544f540
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aws/resource_aws_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error {
}
}

if d.HasChange("disable_api_termination") {
if d.HasChange("disable_api_termination") && !d.IsNewResource() {
_, err := conn.ModifyInstanceAttribute(&ec2.ModifyInstanceAttributeInput{
InstanceId: aws.String(d.Id()),
DisableApiTermination: &ec2.AttributeBooleanValue{
Expand Down

0 comments on commit 544f540

Please sign in to comment.