Fist attempt to factor microOS install
This commit is contained in:
@@ -1,17 +1,19 @@
|
||||
|
||||
data "remote_file" "kubeconfig" {
|
||||
conn {
|
||||
host = hcloud_server.first_control_plane.ipv4_address
|
||||
host = module.first_control_plane.ipv4_address
|
||||
port = 22
|
||||
user = "root"
|
||||
private_key = local.ssh_private_key
|
||||
agent = var.private_key == null
|
||||
}
|
||||
path = "/etc/rancher/k3s/k3s.yaml"
|
||||
|
||||
depends_on = [null_resource.first_control_plane]
|
||||
}
|
||||
|
||||
locals {
|
||||
kubeconfig_external = replace(data.remote_file.kubeconfig.content, "127.0.0.1", hcloud_server.first_control_plane.ipv4_address)
|
||||
kubeconfig_external = replace(data.remote_file.kubeconfig.content, "127.0.0.1", module.first_control_plane.ipv4_address)
|
||||
kubeconfig_parsed = yamldecode(local.kubeconfig_external)
|
||||
kubeconfig_data = {
|
||||
host = local.kubeconfig_parsed["clusters"][0]["cluster"]["server"]
|
||||
|
Reference in New Issue
Block a user