Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

lonegunmanb
Copy link
Contributor

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.

…es so we can pass them directly to kubernetes provider
@ghost ghost added the size/M label May 7, 2020
@ghost ghost added size/S and removed size/M labels May 8, 2020
@chanind
Copy link
Contributor

chanind commented May 19, 2020

👍 was just going to request this same feature! It's really awkward and error-prone to use the current system of writing out configs to files during runs. We need to immediately read-in the files again later in the Terraform run, and terraform doesn't know that the content of these files depends on the output of the alicloud_cs_serverless_kubernetes resource. Terraform also freaks out if these files don't exist before the run starts, so you need to manually touch the files first. This PR would make all this much much better! Would also love to see this same output in the alicloud_cs_managed_kubernetes resource too.

@lonegunmanb
Copy link
Contributor Author

👍 was just going to request this same feature! It's really awkward and error-prone to use the current system of writing out configs to files during runs. We need to immediately read-in the files again later in the Terraform run, and terraform doesn't know that the content of these files depends on the output of the alicloud_cs_serverless_kubernetes resource. Terraform also freaks out if these files don't exist before the run starts, so you need to manually touch the files first. This PR would make all this much much better! Would also love to see this same output in the alicloud_cs_managed_kubernetes resource too.

You're right man, I'll submit another pr for alicloud_cs_managed_kubernetes when I got time. But I doubt that they'll accept this pr quickly or not.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants