Trigger copying of secrets when recreating nodes
Recreating a deleted controller node through terraform
apply resulted in a broken etcd because the secrets were
not provisioned.
MODIFY
aws/flatcar-linux/kubernetes/ssh.tf
aws/flatcar-linux/kubernetes/ssh.tf
@@ -58,6 +58,10 @@ resource "null_resource" "copy-controller-secrets" {
"sudo chmod -R 500 /etc/ssl/etcd",
]
}
+
+ triggers = {
+ controller_id = "${aws_instance.controllers.*.id[count.index]}"
+ }
}
# Secure copy bootkube assets to ONE controller and start bootkube to perform

MODIFY
packet/flatcar-linux/kubernetes/ssh.tf
packet/flatcar-linux/kubernetes/ssh.tf
@@ -58,6 +58,10 @@ resource "null_resource" "copy-controller-secrets" {
"sudo chmod -R 500 /etc/ssl/etcd",
]
}
+
+ triggers = {
+ controller_id = "${packet_device.controllers.*.id[count.index]}"
+ }
}
# Secure copy bootkube assets to ONE controller and start bootkube to perform

Trigger copying of secrets when recreating nodes

Recreating a deleted controller node through terraform
apply resulted in a broken etcd because the secrets were
not provisioned.