How to delete the Multiple Cloud Providers resources

Corey Ducre (He/Him)
2 min readAug 29, 2023
Photo by Steve Jewett on Unsplash

Efficient Resource Cleanup Using Terraform

Step 1: Empty Your AWS S3 Bucket

  1. Open the AWS Console and navigate to the S3 service.

2. Select the target bucket and choose the “Empty” option.

3. Confirm the deletion by entering “permanently delete” in the provided text field.

4. Click on “Empty” to proceed.

Step 2: Disable Instance Deletion Protection

  1. Launch the Google Editor and access the path: mission1_en/mission1/en/terraform/. Open the tcb_gcp_database.tf file.

2. Locate line 11 in tcb_gcp_database.tf file and modify:
— Replace deletion_protection = “true” with deletion_protection = “false”

3. Switch to the Terminal.

4. Execute the following commands to apply the changes in the terraform file:

cd ~/mission1_en/mission1/en/terraform/
terraform init
terraform apply
Enter a value: yes

Now, you’re set to delete all resources using terraform destroy.

5. Run the following command to initiate resource deletion:

terraform destroy
Enter a value: yes

Congratulations! All resources have been efficiently deleted from multiple Cloud Providers with a single command!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

No responses yet

Write a response