From d250191ed0a22f91138cb2a507419da273f7376c Mon Sep 17 00:00:00 2001 From: "Timothy J. Aveni" Date: Sat, 27 Jun 2026 22:57:58 -0700 Subject: [PATCH] Auto-approve AMI builder cleanup --- README.md | 3 ++- publish-ami.sh | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f5324c9..655686e 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,8 @@ boot generation that expects `/nix`, and powers off. After the instance is stopped, `publish-ami.sh` creates the final AMI from the stopped instance, tags the AMI and snapshots, writes `artifact.json`, and then -destroys the temporary builder resources. Use `--keep-builder` when debugging. +destroys the temporary builder resources without a confirmation prompt. Use +`--keep-builder` when debugging. The OpenTofu state in this directory owns only temporary builder resources. The published AMI and its snapshots are created by the script and are not in diff --git a/publish-ami.sh b/publish-ami.sh index 374f256..098d0c7 100755 --- a/publish-ami.sh +++ b/publish-ami.sh @@ -301,6 +301,7 @@ jq -n \ if [ "$keep_builder" = false ]; then tofu destroy \ + -auto-approve \ -var "aws_region=$aws_region" \ -var "name=$name" \ -var "system=$system" \