Skip to content

Shut down and clean up

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:

Terminal window
cd gcloud/tf
tofu destroy

this will ask us if we want to proceed:

Terminal window
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

Terminal window
......
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.