Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Terraform Associate All Questions

View all questions & answers for the Terraform Associate exam

Exam Terraform Associate topic 1 question 30 discussion

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

You have 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 will be deleted by Terraform.
Which command should you use to show all of the resources that will be deleted? (Choose two.)

  • A. Run terraform plan -destroy.
  • B. This is not possible. You can only show resources that will be created.
  • C. Run terraform state rm *.
  • D. Run terraform destroy and it will first output all the resources that will be deleted before prompting for approval.
Show Suggested Answer Hide Answer
Suggested Answer: AD 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Ipergorta
Highly Voted 2 years, 6 months ago
The answer is A,D
upvoted 25 times
...
ItaloVinodi
Highly Voted 2 years, 6 months ago
Selected Answer: AD
We need to choose two so AD
upvoted 12 times
...
ravi135
Most Recent 9 months, 2 weeks ago
answer AD
upvoted 1 times
...
Shane_C
1 year, 4 months ago
Selected Answer: AD
AD are correct
upvoted 2 times
...
vj_dhaksh
1 year, 5 months ago
Answer is AD C - incorrect as running "terraform state rm *" throws error stating variable required (* wont pick all)
upvoted 3 times
...
karendavtyan
1 year, 6 months ago
D. Run terraform destroy and it will first output all the resources that will be deleted before prompting for approval.
upvoted 1 times
...
karendavtyan
1 year, 6 months ago
Selected Answer: A
A. Run terraform plan -destroy.
upvoted 1 times
...
Ni33
1 year, 6 months ago
Selected Answer: AD
A and D are correct.
upvoted 1 times
...
Bluemoon22
1 year, 7 months ago
A is only to show the resources will be destroyed, terraform plan -destroy D is a common operation from terraform destroy
upvoted 1 times
...
AzRNoob
1 year, 7 months ago
A. Run terraform plan -destroy. This command will generate a plan that shows all of the changes Terraform will make to the infrastructure, including any resources that will be destroyed. The -destroy flag specifies that only the changes that will result in the destruction of resources should be shown. Option D is also partially correct, as running terraform destroy will output a list of resources that will be destroyed before prompting for approval. However, it is generally recommended to run terraform plan -destroy first to preview the changes before actually executing them with terraform destroy. Option B is incorrect, as it is possible to show resources that will be deleted using the terraform plan -destroy command. Option C is also incorrect, as running terraform state rm * will remove all resources from the Terraform state file, effectively "forgetting" about them and making it impossible to manage them with Terraform.
upvoted 6 times
...
Faaizz
1 year, 7 months ago
Selected Answer: AD
A & D are correct here
upvoted 1 times
...
connecttozee
1 year, 7 months ago
100% is AD
upvoted 1 times
...
Power123
1 year, 7 months ago
A and D are correct
upvoted 1 times
...
r1ck
1 year, 8 months ago
https://developer.hashicorp.com/terraform/cli/commands/destroy AD
upvoted 1 times
...
andersonbispos42
1 year, 11 months ago
Selected Answer: AD
The answer is A, D
upvoted 1 times
...
andersonbispos42
1 year, 11 months ago
Selected Answer: A
The answer is only A
upvoted 1 times
...
vikramvlr
1 year, 11 months ago
Correct answer - AD
upvoted 1 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 ...