export alicloud_cs_serverless_kubernetes client_cert/client_key/cluster_ca_cert/kube_config as attributes so we can pass them directly to kubernetes provider #2420
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
One common scenario of using alicloud_cs_serverless_kubernetes is we create a cluster and store it's key information in a backend, then another terraform stack can read these keys from remote state then provision the cluster. If we want to do so now, we need write these key informations into four files and read them into backend. Imagine if you'are using CI, and your CI agent is a container in a K8s cluster, the runner who created cluster is different than the runner who need to destroy it, and runner who want to destroy this cluster will find lacking of these four files and throw an error.
So the best way is export these keys directly as attributes so we can store them into backend or pass them to kubernetes provider instead of writing to any file.