terraform-provider-stackit
terraform-provider-stackit copied to clipboard
Add cluster certificate and host outputs to the ske_cluster data
Adding the cluster certificate and host outputs to the ske_cluster data will smoothly improve Kubernetes provider setup.
data "stackit_ske_cluster" "main" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-name"
}
provider "kubernetes" {
host = data.stackit_ske_cluster.main.host
cluster_ca_certificate = base64decode(data.stackit_ske_cluster.main.cluster_ca_certificate)
exec {
api_version = "client.authentication.k8s.io/v1"
command = "stackit"
args = ["ske", "kubeconfig", "login", "--project=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "--cluster=name"]
}
}