Skip to content

Commit 513ca26

Browse files
authored
fix: when accept risk is not found, do not continue reading it (#593)
If the resource is removed through the UI, and we created it through terraform, terraform should re-create it, if it's still present. There's a nil pointer dereference in the read method when the resource is not found, this fixes it.
1 parent b442838 commit 513ca26

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sysdig/resource_sysdig_secure_accept_vulnerability_risk.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ func resourceSysdigSecureVulnerabilityAcceptRiskRead(ctx context.Context, d *sch
256256
if err != nil {
257257
if statusCode == http.StatusNotFound {
258258
d.SetId("")
259+
return nil
259260
} else {
260261
return diag.FromErr(err)
261262
}

0 commit comments

Comments
 (0)