Shut down and clean up
Clean up (destroy) the infrastructure
Section titled “Clean up (destroy) the infrastructure”Now we no longer have use for the test infrastructure it is time to clear it down to save hosting costs.
From our host machine and within the infctl-cli
repository we have checked out:
cd gcloud/tftofu destroy
this will ask us if we want to proceed:
Plan: 0 to add, 0 to change, 5 to destroy.
...
Do you really want to destroy all resources? OpenTofu will destroy all your managed infrastructure, as shown above. There is no undo. Only 'yes' will be accepted to confirm.
Enter a value:
Enter yes
and press return.
this should compete with
......Google_compute_disk.app_data_disk: Destruction complete after 2s
Destroy complete! Resources: 5 destroyed.
No further costs will be incurred on your Google Cloud account for this test infrastructure and you can rebuild whenever you need to run further tests or carry out disaster recovery rehearsals.