ExamGecko
Question list
Search
Search

Question 185 - Terraform Associate 003 discussion

Report
Export

You used Terraform to create an ephemeral development environment in the cloud and are now ready to destroy all the infrastructure described by your Terraform configuration. To be safe, you would like to first see all the infrastructure that Terraform will delete.

Which command should you use to show all the resources that will be deleted? (Pick the 2 correct responses)

A.

Run terraform destroy. This will output all the resources that will be deleted before prompting for approval.

Answers
A.

Run terraform destroy. This will output all the resources that will be deleted before prompting for approval.

B.

Run terraform show -destroy.

Answers
B.

Run terraform show -destroy.

C.

Run terraform state rm *.

Answers
C.

Run terraform state rm *.

Suggested answer: A, B

Explanation:

Running terraform destroy will show all resources that will be deleted before prompting for approval. You can also run terraform plan -destroy to simulate the destruction without actually applying it, which is useful for reviewing the planned changes.

References:

Terraform Destroy

asked 29/10/2024
Pierre Smit
41 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first