What is the name of the default file where Terraform stores the state?

terraform.config

terraform.state

terraform.tfstate

Terraform uses a default file named `terraform.tfstate` to store its state information. The state file is crucial because it defines the current infrastructure's status and configuration as understood by Terraform.

Whenever changes are made to your infrastructure using Terraform, it updates this state file to reflect those changes. It acts as a source of truth, ensuring that Terraform knows what resources exist, their attributes, and the relationships between them. This enables Terraform to plan and apply changes accurately, maintaining the desired configuration of your environment.

The file is stored in the root directory of the Terraform configuration unless specified otherwise through backend configuration. This default behavior helps users manage their infrastructure efficiently without needing to specify a state management strategy. The proper management of the state file is essential for collaboration and consistent deployments, as it enables teams to track infrastructure changes over time.

Other options listed, such as `terraform.config`, `terraform.output`, and `terraform.state`, do not represent the standard naming convention or function of the state file within Terraform's architecture.

terraform.output

Want more questions?

All options are one-time payments.

$25.99

30 day pass for new members

All the basics to get you started

  • Ad-free experience
  • View your previous attempt history
  • Mobile app access
  • In-depth explanations
  • 30 day premium pass access
$59.99$171.99 usd

6 month DELUXE pass (most popular)

Full access FOR 6 MONTHS! & the ultimate digital PDF study guide (BONUS)

  • $171.99 usd value for $59.99! You save $106!
  • Ad-free experience
  • View your previous attempt history
  • Mobile app access
  • In-depth explanations
  • 6 months of full access
  • Ultimate digital PDF study guide included
  • Priority support
$15.99 $24.99

Ultimate digital PDF study guide

For those that prefer a more traditional form of learning

  • Available for instant download
  • Available offline
  • Hundreds of practice multiple choice questions
  • Comprehensive content
  • Detailed explanations
Image Description
Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy