exam questions

Exam Terraform Associate All Questions

View all questions & answers for the Terraform Associate exam

Exam Terraform Associate topic 1 question 346 discussion

Actual exam question from HashiCorp's Terraform Associate
Question #: 346
Topic #: 1
[All Terraform Associate Questions]

What does terraform destroy do?

  • A. Destroys the Terraform state file, leaves the infrastructure intact.
  • B. Destroys all Terraform code files in the current directory, leaves the state file intact.
  • C. Destroy all infrastructure in the Terraform state file.
  • D. Destroys all infrastructure in the configured Terraform provider.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
geekos
1 month, 4 weeks ago
Selected Answer: C
The terraform destroy command only targets resources that are explicitly managed by the Terraform state file for the current project. It does not destroy all resources in the provider (e.g., AWS, Azure) unless those resources are part of the Terraform-managed configuration. Resources outside of Terraform's state file or configuration remain untouched, even if they exist within the same provider
upvoted 2 times
...
ArturoM97
2 months, 1 week ago
Selected Answer: C
C, you can have multiple providers.
upvoted 2 times
...
Dakeh
3 months ago
Selected Answer: C
You could have multiple providers, for me it's C, terraform destroy every instance object managed by the state file.
upvoted 2 times
...
ayrtonjohn
3 months, 2 weeks ago
Selected Answer: D
im here
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago