Skip to content

Commit

Permalink
specify matti/resource/shell module version. fix #9
Browse files Browse the repository at this point in the history
  • Loading branch information
remche committed Sep 29, 2021
1 parent b91f0ac commit d15cc03
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kubernetes.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,28 @@ resource "null_resource" "write_kubeconfig" {

module "host" {
source = "matti/resource/shell"
version = "1.5.0"
count = var.output_kubernetes_config ? 1 : 0
command = "${local.ssh} ${var.system_user}@${module.server.floating_ip[0]} sudo KUBECONFIG=/etc/rancher/rke2/rke2-remote.yaml /var/lib/rancher/rke2/bin/kubectl config view --raw=true -o jsonpath='{.clusters[0].cluster.server}'"
}

module "client_certificate" {
source = "matti/resource/shell"
version = "1.5.0"
count = var.output_kubernetes_config ? 1 : 0
command = "${local.ssh} ${var.system_user}@${module.server.floating_ip[0]} sudo KUBECONFIG=/etc/rancher/rke2/rke2-remote.yaml /var/lib/rancher/rke2/bin/kubectl config view --raw=true -o jsonpath='{.users[0].user.client-certificate-data}'"
}

module "client_key" {
source = "matti/resource/shell"
version = "1.5.0"
count = var.output_kubernetes_config ? 1 : 0
command = "${local.ssh} ${var.system_user}@${module.server.floating_ip[0]} sudo KUBECONFIG=/etc/rancher/rke2/rke2-remote.yaml /var/lib/rancher/rke2/bin/kubectl config view --raw=true -o jsonpath='{.users[0].user.client-key-data}'"
}

module "cluster_ca_certificate" {
source = "matti/resource/shell"
version = "1.5.0"
count = var.output_kubernetes_config ? 1 : 0
command = "${local.ssh} ${var.system_user}@${module.server.floating_ip[0]} sudo KUBECONFIG=/etc/rancher/rke2/rke2-remote.yaml /var/lib/rancher/rke2/bin/kubectl config view --raw=true -o jsonpath='{.clusters[0].cluster.certificate-authority-data}'"
}

0 comments on commit d15cc03

Please sign in to comment.