rancher / terraform-provider-rancher2

Terraform Rancher2 provider
https://www.terraform.io/docs/providers/rancher2/
Mozilla Public License 2.0
263 stars 228 forks source link

[RFE] Cloud Credentials can be deleted even if there are clusters using them #1350

Closed DovydasNavickas closed 6 months ago

DovydasNavickas commented 6 months ago

Is your feature request related to a problem? Please describe.

I had S3-Compatible Cloud Credentials and I deleted them, thinking that there will be a warning if the cluster is using them. Unfortunately, after credentials were deleted, I found this error on the cluster:

failed to lookup etcdSnapshotCloudCredentialName: secrets "cc-b22nx" not found, refreshing etcd create state

Describe the solution you'd like

When trying to delete the Cloud Credentials a warning that there is a cluster using them would be shown.

Describe alternatives you've considered

Manually checking the clusters for the credential. That maybe fine when there are only a couple of clusters, but at some point this becomes very tedious or just "delete and what breaks" kind of situation.

Additional context

DovydasNavickas commented 6 months ago

Wrong repo... 😄