Adjusting provisioner scripts
This commit is contained in:
parent
75ad938a1b
commit
65cd9c2b0d
1 changed files with 4 additions and 2 deletions
|
|
@ -72,6 +72,10 @@ resource "null_resource" "talos_cluster" {
|
|||
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..."
|
||||
sudo --preserve-env=HOME talosctl cluster create \
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue