# Terraform: Error: Backend initialization required, please run "terraform init" — Reason: Initial configuration of the requested backend "s3"

**Code:** `Backend initialization required` · **Category:** Terraform · **Seen on:** Terraform

Terraform needs `terraform init` to set up the backend (new directory, changed backend config, missing `.terraform`).

## Meaning

Run `terraform init`. If the message says "Backend configuration changed", use `terraform init -reconfigure` (keep state in the new config) or `-migrate-state` (move state between backends). CI must always run init (cache `.terraform` carefully).

## Common causes

- Fresh checkout without `.terraform`
- Backend block added/changed
- Different `-backend-config` values
- `.terraform` deleted/not cached in CI
- Switched workspaces/dirs

## Quick fix

1. `terraform init` (or `-reconfigure` / `-migrate-state`)
2. Pass the same `-backend-config` in CI
3. Don't commit `.terraform`; do init in every job

## Detailed fix by platform

### Terraform

1. `terraform init -reconfigure -backend-config=backend.hcl`

## How to diagnose

1. **Reason** — New or changed?
2. **Config** — backend-config same?
3. **CI** — init run?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/terraform/backend-initialization-required)
