---
type: archive
area: archive
status: archived
date: 2026-05-03
created: 2026-05-03
updated: 1980-01-01
tags:
  - archive
---
terraform init  download necessary plugins
terraform plan try to refresh in-memory state 
terraform also try to refresh in-memory state

When we run apply to a specific resources after running it before  and teraform will not do any changes because the resources are not changed
When running apply it creates a state file terraform.tfstate
every time we run terraform apply, terraform updates the state file based on the new changes in infrasructure

When terraform creates a resource it records it's identity in the cloud
Each resources created by terraform is assigned an id by it.
State Helps in improving performance
it caches all the configuration and in future updates relies in this cache
Helps in collaboration
- In collaboration all team members should use the latest state version
- It's highly recommended to store the state in remote storage to be shared between team
State contains sensitive information
state files should be stored in safe storage
never manual edits state file
