Merge pull request #5748 from hashicorp/b-5402
provider/digitalocean: Check for nil response
This commit is contained in:
commit
07297f10d6
|
@ -20,6 +20,7 @@ BUG FIXES:
|
||||||
* core: Modules sourced from a Mercurial repository now work correctly on Windows [GH-5739]
|
* core: Modules sourced from a Mercurial repository now work correctly on Windows [GH-5739]
|
||||||
* provider/aws: Fix crash when an `aws_rds_cluster_instance` is removed outside of Terraform [GH-5717]
|
* provider/aws: Fix crash when an `aws_rds_cluster_instance` is removed outside of Terraform [GH-5717]
|
||||||
* provider/aws: `aws_lambda_function` resources no longer error on refresh if deleted externally to Terraform [GH-5668]
|
* provider/aws: `aws_lambda_function` resources no longer error on refresh if deleted externally to Terraform [GH-5668]
|
||||||
|
* provider/aws: `aws_vpn_connection` resources deleted via the console on longer cause a crash [GH-5747]
|
||||||
* provider/google: Default description `google_dns_managed_zone` resources to "Managed By Terraform" [GH-5428]
|
* provider/google: Default description `google_dns_managed_zone` resources to "Managed By Terraform" [GH-5428]
|
||||||
* provider/google: Fix error message on invalid instance URL for `google_compute_instance_group` [GH-5715]
|
* provider/google: Fix error message on invalid instance URL for `google_compute_instance_group` [GH-5715]
|
||||||
* provider/vsphere: provide `host` to provisioner connections [GH-5558]
|
* provider/vsphere: provide `host` to provisioner connections [GH-5558]
|
||||||
|
|
|
@ -74,7 +74,7 @@ func resourceDigitalOceanSSHKeyRead(d *schema.ResourceData, meta interface{}) er
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// If the key is somehow already destroyed, mark as
|
// If the key is somehow already destroyed, mark as
|
||||||
// successfully gone
|
// successfully gone
|
||||||
if resp.StatusCode == 404 {
|
if resp != nil && resp.StatusCode == 404 {
|
||||||
d.SetId("")
|
d.SetId("")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue