Adjusting provisioner scripts

This commit is contained in:
vandomej 2025-09-28 15:43:30 -07:00
parent 75ad938a1b
commit 65cd9c2b0d

View file

@ -71,6 +71,10 @@ resource "null_resource" "talos_cluster" {
provisioner "local-exec" {
command = <<EOT
set -e # Exit on error
# Cleaning up any existing configs for this cluster
chmod +x ${path.module}/cleanup.sh
${path.module}/cleanup.sh ${self.triggers.cluster_name}
# Now create the cluster
echo "Creating new cluster..."
@ -92,8 +96,6 @@ resource "null_resource" "talos_cluster" {
provisioner "local-exec" {
when = destroy
command = <<EOT
# Call cleanup script
chmod +x ${path.module}/cleanup.sh
${path.module}/cleanup.sh ${self.triggers.cluster_name}
EOT