Terraform — Remove
Remove steps
Section titled “Remove steps”Run cleanup only when you choose to retire your Terraform deployment. Review the saved destruction plan: it must contain only resources owned by this state, with no namespace or xcsh resource deletion.
terraform -chdir="$XCSH_WORKDIR/deployment" plan -destroy \ -out="$XCSH_WORKDIR/deployment/destroy.plan"terraform -chdir="$XCSH_WORKDIR/deployment" show \ "$XCSH_WORKDIR/deployment/destroy.plan"shasum -a 256 "$XCSH_WORKDIR/deployment/destroy.plan"Apply the reviewed plan
Section titled “Apply the reviewed plan”Confirm the exact owned resources and saved-plan hash before running the apply command.
terraform -chdir="$XCSH_WORKDIR/deployment" apply \ "$XCSH_WORKDIR/deployment/destroy.plan"unset XCSH_API_TOKENSee the input and lifecycle reference for protected files, write-only values, import, drift, and key-algorithm cutovers.