Add AMI artifact management tool

This commit is contained in:
Timothy J. Aveni
2026-06-27 22:32:58 -07:00
parent 1e23ccafc3
commit 2a27fa43d1
4 changed files with 376 additions and 0 deletions
+17
View File
@@ -60,3 +60,20 @@ The final AMI is tagged with:
Do not deregister the AMI or delete either snapshot while runtime deployments
use it.
## Artifact Cleanup
List published AMIs and cross-reference qx-deploy runtime registry records:
```bash
nix run ./tofu/ami-builder#ami-artifacts -- list
```
Delete an unused AMI and its root and `/nix` snapshots:
```bash
nix run ./tofu/ami-builder#ami-artifacts -- delete --ami-id ami-...
```
The delete command refuses to delete AMIs referenced by runtime deployment
registry records unless you pass `--force`.