Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,11 @@ EOT
}
}

data "local_file" "kube_config_raw_file" {
data "local_file" "kubeconfig_file" {
filename = local.kubeconfig_file
depends_on = [ null_resource.copy_kubeconfig ]
}

# output "kube_config_raw" {
# value = data.local_file.kube_config_raw_file
# description = "Kubeconfig for this cluster"
# }

# data "external" "extract_kubeconfig_file" {
# program = ["bash", "${path.module}/kubeconfig_extraction.sh"]

# query = {
# PATH_ROOT=path.root
# SERVER_IP=openstack_compute_instance_v2.kubernetes_server.access_ip_v4
# SSH_KEY=local.ssh_keys.private_key_file
# # KUBECONFIG_FILE=local.kubeconfig_file
# }
# }
output "kubeconfig_raw" {
value = data.local_file.kubeconfig_file.content
description = "Kubeconfig for this cluster"
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ output "created_hosts" {
name = k
} },
{
(local.controller_host.name) : local.controller_host_instance
(local.controller_host.name) : local.controller_host_instance
})

description = "Created Hosts: A map of { hostname: { data } }"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ locals {


locals {
controller_host = one([for host in var.host_instances : host if host.is_controller])
controller_host = one([for host in var.host_instances : host if host.is_controller])
created_controller_host = openstack_compute_instance_v2.kubernetes_server
controller_host_instance = {
name = local.controller_host.name
Expand All @@ -16,7 +16,7 @@ locals {

locals {
output_file_directory = var.output_file_directory != null ? var.output_file_directory : "${path.root}/.build"
kubeconfig_file = "${local.output_file_directory}/downloaded-kubeconfig.yaml"
kubeconfig_file = "${local.output_file_directory}/downloaded-kubeconfig.yaml"
}

resource "random_id" "server" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ variable "ssh_key_pair" {
}

variable "output_file_directory" {
type = string
default = null
type = string
default = null
description = "Optional path to write output files to. If directory doesnt exist it will be created"
}
Loading