diff --git a/assets.tf b/assets.tf index 55260527..724af6c0 100644 --- a/assets.tf +++ b/assets.tf @@ -1,6 +1,6 @@ # Self-hosted Kubernetes bootstrap-manifests resource "template_dir" "bootstrap-manifests" { - source_dir = "${path.module}/resources/bootstrap-manifests" + source_dir = "bootkube/resources/bootstrap-manifests" destination_dir = "${var.asset_dir}/bootstrap-manifests" vars { @@ -20,7 +20,7 @@ resource "template_dir" "bootstrap-manifests" { # Self-hosted Kubernetes manifests resource "template_dir" "manifests" { - source_dir = "${path.module}/resources/manifests" + source_dir = "bootkube/resources/manifests" destination_dir = "${var.asset_dir}/manifests" vars { @@ -66,7 +66,7 @@ resource "local_file" "user-kubeconfig" { } data "template_file" "kubeconfig" { - template = "${file("${path.module}/resources/kubeconfig")}" + template = "${file("bootkube/resources/kubeconfig")}" vars { ca_cert = "${base64encode(var.ca_certificate == "" ? join(" ", tls_self_signed_cert.kube-ca.*.cert_pem) : var.ca_certificate)}" @@ -77,7 +77,7 @@ data "template_file" "kubeconfig" { } data "template_file" "user-kubeconfig" { - template = "${file("${path.module}/resources/user-kubeconfig")}" + template = "${file("bootkube/resources/user-kubeconfig")}" vars { name = "${var.cluster_name}" diff --git a/conditional.tf b/conditional.tf index ec9c8522..871f7aef 100644 --- a/conditional.tf +++ b/conditional.tf @@ -2,7 +2,7 @@ resource "template_dir" "flannel-manifests" { count = "${var.networking == "flannel" ? 1 : 0}" - source_dir = "${path.module}/resources/flannel" + source_dir = "bootkube/resources/flannel" destination_dir = "${var.asset_dir}/manifests-networking" vars { @@ -15,7 +15,7 @@ resource "template_dir" "flannel-manifests" { resource "template_dir" "calico-manifests" { count = "${var.networking == "calico" ? 1 : 0}" - source_dir = "${path.module}/resources/calico" + source_dir = "bootkube/resources/calico" destination_dir = "${var.asset_dir}/manifests-networking" vars { @@ -30,7 +30,7 @@ resource "template_dir" "calico-manifests" { resource "template_dir" "weave-manifests" { count = "${var.networking == "weave" ? 1 : 0}" - source_dir = "${path.module}/resources/weave" + source_dir = "bootkube/resources/weave" destination_dir = "${var.asset_dir}/manifests-networking" vars {