diff --git a/builtin/providers/aws/resource_aws_load_balancer_backend_server_policy.go b/builtin/providers/aws/resource_aws_load_balancer_backend_server_policy.go index d3759ffcb..325c4fd1a 100644 --- a/builtin/providers/aws/resource_aws_load_balancer_backend_server_policy.go +++ b/builtin/providers/aws/resource_aws_load_balancer_backend_server_policy.go @@ -77,8 +77,8 @@ func resourceAwsLoadBalancerBackendServerPoliciesRead(d *schema.ResourceData, me if err != nil { if ec2err, ok := err.(awserr.Error); ok { if ec2err.Code() == "LoadBalancerNotFound" { - return fmt.Errorf("LoadBalancerNotFound: %s", err) d.SetId("") + return fmt.Errorf("LoadBalancerNotFound: %s", err) } } return fmt.Errorf("Error retrieving ELB description: %s", err) diff --git a/builtin/providers/aws/resource_aws_load_balancer_listener_policy.go b/builtin/providers/aws/resource_aws_load_balancer_listener_policy.go index 2a13be1c3..d1c8cacbb 100644 --- a/builtin/providers/aws/resource_aws_load_balancer_listener_policy.go +++ b/builtin/providers/aws/resource_aws_load_balancer_listener_policy.go @@ -77,8 +77,8 @@ func resourceAwsLoadBalancerListenerPoliciesRead(d *schema.ResourceData, meta in if err != nil { if ec2err, ok := err.(awserr.Error); ok { if ec2err.Code() == "LoadBalancerNotFound" { - return fmt.Errorf("LoadBalancerNotFound: %s", err) d.SetId("") + return fmt.Errorf("LoadBalancerNotFound: %s", err) } } return fmt.Errorf("Error retrieving ELB description: %s", err)