terraform-associate question 300 discussion

View all HashiCorp Certified: Terraform Associate Exam here
back to hashicorp forum

Question 300

Complete the following sentence:
The terraform state command can be used to ____

  • A. modify state
  • B. view state
  • C. refresh state
  • D. There is no such command
Answer:

A


Explanation:
https://www.terraform.io/docs/commands/state/index.html

User Votes:
A
50%
B 1 votes
50%
C
50%
D
50%
Discussions
0 / 1000
nassimaelferkhsi
1 month, 2 weeks ago

The terraform state command in Terraform is primarily used to interact with and inspect the state file. It allows users to view the current state of resources managed by Terraform, making it possible to see how Terraform perceives the infrastructure at any given point. While it is possible to modify and refresh state through other commands (such as terraform refresh and terraform state push), the main purpose of terraform state is for viewing, listing, and inspecting the state file.