Update terraform.tf, output.tf
This commit is contained in:
5
output.tf
Normal file
5
output.tf
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
resource "local_file" "kubeconfig" {
|
||||||
|
depends_on = [linode_lke_cluster.foobar]
|
||||||
|
filename = "kube-config"
|
||||||
|
content = base64decode(linode_lke_cluster.foobar.kubeconfig)
|
||||||
|
}
|
||||||
28
terraform.tf
28
terraform.tf
@@ -33,33 +33,9 @@ resource "linode_lke_cluster" "foobar" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Export this cluster's attributes
|
|
||||||
output "kubeconfig" {
|
|
||||||
value = linode_lke_cluster.foobar.kubeconfig
|
|
||||||
sensitive = true
|
|
||||||
filename = kubeconfig.yaml
|
|
||||||
}
|
|
||||||
|
|
||||||
output "api_endpoints" {
|
|
||||||
value = linode_lke_cluster.foobar.api_endpoints
|
|
||||||
}
|
|
||||||
|
|
||||||
output "status" {
|
|
||||||
value = linode_lke_cluster.foobar.status
|
|
||||||
}
|
|
||||||
|
|
||||||
output "id" {
|
|
||||||
value = linode_lke_cluster.foobar.id
|
|
||||||
}
|
|
||||||
|
|
||||||
output "pool" {
|
|
||||||
value = linode_lke_cluster.foobar.pool
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
provider "kubectl" {
|
provider "kubectl" {
|
||||||
config_path = "./kubeconfig.yaml"
|
config_path = "kubeconfig"
|
||||||
load_config_file = true
|
load_config_file = true
|
||||||
}
|
}
|
||||||
|
|
||||||
data "kubectl_file_documents" "namespace" {
|
data "kubectl_file_documents" "namespace" {
|
||||||
|
|||||||
Reference in New Issue
Block a user