I've got an infra-manager deployment which was created via a one-click "solution" app (https://console.cloud.google.com/products/solutions/details/generative-ai-rag) that can't be deleted. It can't because the Terraform destroy plan cannot be applied. The plan cannot be applied because some infrastructure managed by tf no longer exists in GCP. I can't seem to get tf to run to create the absent resources so I can then delete all the resources it knows about either.
ERROR: build step 0 "us-central1-docker.pkg.dev/cloud-config-sdk/images/config-sdk-tf:public-image-v0.0.150_1.5.7" failed: step exited with non-zero status: 1
ERROR
Finished Step #0 - "Destroy blueprint"
Step #0 - "Destroy blueprint": Error: running tf destroy: terraform destroy failed: running terraform failed: exit status 1
Step #0 - "Destroy blueprint":
Step #0 - "Destroy blueprint": on .terraform/modules/kuberay-operator/modules/kuberay-operator/kuberay.tf line 15
Step #0 - "Destroy blueprint":
Step #0 - "Destroy blueprint": error: Kubernetes cluster unreachable: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
Step #0 - "Destroy blueprint": Error: Kubernetes cluster unreachable: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
Step #0 - "Destroy blueprint": running tf destroy: terraform destroy failed: running terraform failed: exit status 1
Step #0 - "Destroy blueprint": Error: Kubernetes cluster unreachable: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
Step #0 - "Destroy blueprint": time="2024-05-02T09:22:08Z" level=error msg="Error (exit code 1) running \"terraform destroy -auto-approve -json\". Stderr:\n"
Step #0 - "Destroy blueprint": Error: Kubernetes cluster unreachable: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
Step #0 - "Destroy blueprint":
Step #0 - "Destroy blueprint": on .terraform/modules/namespace/modules/kubernetes-namespace/main.tf line 16
Step #0 - "Destroy blueprint":
Step #0 - "Destroy blueprint": error: Kubernetes cluster unreachable: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
Step #0 - "Destroy blueprint": Error: Kubernetes cluster unreachable: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
Step #0 - "Destroy blueprint":
This terraform is being run by a cloud build job that was created when the app was created; I don't know where to find the tf code or if it's possible to do statefile surgery (e.g. pseudocode: gcloud infra-manager deployment export-statefile - | jq 'del(.resources[]|select('resources to delete'))' | gcloud infra-manager import-statefile -). I've gone and deleted everything I could find so far to try and keep from getting charged as this is on a personal account. Help?