Skip to content

Commit

Permalink
Fix error in k8s cluster after deletion
Browse files Browse the repository at this point in the history
- Now if you delete the cluster from the UI or Cli, when you run again the plan or apply command, the resource will be recreate if not found

#16
  • Loading branch information
alejandrojnm committed Jun 7, 2020
1 parent 0bb5787 commit a239402
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion civo/resource_kubernetes_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func resourceKubernetesClusterRead(d *schema.ResourceData, m interface{}) error
log.Printf("[INFO] retrieving the kubernetes cluster %s", d.Id())
resp, err := apiClient.FindKubernetesCluster(d.Id())
if err != nil {
if resp != nil {
if resp == nil {
d.SetId("")
return nil
}
Expand Down

0 comments on commit a239402

Please sign in to comment.