Skip to content

Commit 88d3dc6

Browse files
committed
Don't put local_file resources in module directories
Put them in their own directories or Terraform will regenerate files over and over.
1 parent ab9847f commit 88d3dc6

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

dns.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ data "template_file" "kube_dns_cfg" {
99
resource "local_file" "kube_dns_cfg" {
1010
depends_on = ["module.bootkube"]
1111
content = "${data.template_file.kube_dns_cfg.rendered}"
12-
filename = "${path.module}/${var.asset_dir}/manifests/kube-dns-cfg.yaml"
12+
filename = "${path.module}/${var.asset_dir}/manifests-custom/kube-dns-cfg.yaml"
1313
}

kube-router.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ resource "local_file" "kube_router" {
1515
count = "${var.use_kube_router}"
1616
depends_on = ["module.bootkube"]
1717
content = "${data.template_file.kube_router.rendered}"
18-
filename = "${path.module}/${var.asset_dir}/manifests-networking/kube-router.yaml"
18+
filename = "${path.module}/${var.asset_dir}/manifests-custom/kube-router.yaml"
1919
}

ssh.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Write private SSH key to file for e2e, etc
22
resource "local_file" "ssh_key_private" {
33
content = "${tls_private_key.ssh.private_key_pem}"
4-
filename = "${path.module}/assets/auth/id_rsa"
4+
filename = "${path.module}/assets/auth-custom/id_rsa"
55

66
provisioner "local-exec" {
7-
command = "chmod 600 ${path.module}/assets/auth/id_rsa"
7+
command = "chmod 600 ${path.module}/assets/auth-custom/id_rsa"
88
}
99
}
1010

templates/node.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ storage:
486486
# Wrapper for bootkube start
487487
set -e
488488
# Move experimental manifests
489-
[ -d /opt/bootkube/assets/manifests-* ] && mv /opt/bootkube/assets/manifests-*/* /opt/bootkube/assets/manifests && rm -rf /opt/bootkube/assets/manifests-*
489+
[ -n "$(ls -d /opt/bootkube/assets/manifests-*)" ] && mv /opt/bootkube/assets/manifests-*/* /opt/bootkube/assets/manifests && rm -rf /opt/bootkube/assets/manifests-*
490490
[ -d /opt/bootkube/assets/experimental/manifests ] && mv /opt/bootkube/assets/experimental/manifests/* /opt/bootkube/assets/manifests && rm -r /opt/bootkube/assets/experimental/manifests
491491
[ -d /opt/bootkube/assets/experimental/bootstrap-manifests ] && mv /opt/bootkube/assets/experimental/bootstrap-manifests/* /opt/bootkube/assets/bootstrap-manifests && rm -r /opt/bootkube/assets/experimental/bootstrap-manifests
492492
BOOTKUBE_ACI="$${BOOTKUBE_ACI:-quay.io/coreos/bootkube}"

0 commit comments

Comments
 (0)