sales-demos-teardownlisted
Install: claude install-skill ericcames/sales.demos
# sales-demos-teardown
Destroys the VMs from `terraform/ocpvirt/` and removes them from the AAP
inventory. This is the counterpart to `sales-demos-provision`, and it runs the same
Terraform state.
## What survives, and why it matters
`terraform destroy` can only remove what is in its state, so scoping is a
property of the module rather than a flag anyone has to remember:
| Destroyed | Preserved |
|---|---|
| The demo namespace (`sales-demos-<env>`) | OpenShift Virtualization (`openshift-cnv`) |
| The Linux and Windows VMs | The boot-source DataSources, incl. the Windows golden image |
| Their Services and Routes | The published quay containerdisk |
| The `sd1.*` cluster instance types | `sales-demos-tfstate`, the state namespace |
Rebuilding CNV or the golden image is roughly a 45-minute cost. **Do not "tidy
up" anything by hand after a teardown** — the reason this is safe is that
Terraform never had those objects, and a manual `oc delete` has no such
guardrail.
The state namespace surviving is load-bearing: it holds the Secret describing
every VM Terraform tracks, for **both** environments. Deleting it orphans
everything.
## Teardown runs from AAP, not from a laptop
Before destroying anything, `teardown.yml` SSHes into every Linux guest to
release its Red Hat subscription and remove its Insights host (#47). It reaches
them at `<vm>.<namespace>.svc.cluster.local`, the headless Service DNS name,
which resolves **only from inside the cluster**. An AAP execution environm