What is Terraform remote state?

Answer

Remote state stores the Terraform state file in a shared location accessible to all team members and CI/CD systems, rather than locally. Configure with a backend block: terraform { backend "s3" { bucket = "my-tf-state"; key = "prod/vpc/terraform.tfstate"; region = "us-east-1"; dynamodb_table = "tf-locks" } }. Benefits: Collaboration: all team members use the same state. State locking: prevents concurrent applies (DynamoDB lock for S3 backend). Security: state is not on developer laptops. Versioning: S3 bucket versioning allows rollback. Common backends: S3 + DynamoDB (AWS), Azure Blob Storage, GCS (GCP), Terraform Cloud (managed, includes locking and remote execution). Run terraform init after changing backends — Terraform will offer to migrate local state to the remote backend.