docs/src/data/faq/does-terragrunt-create-my-state-backend-automatically.mdx
Yes, if you ask it to. Terragrunt can provision the resources named in your remote_state block, such as an S3 bucket, a DynamoDB table, or a GCS bucket, so you do not have to create them by hand before your first run.
This is opt-in. --backend-bootstrap defaults to false, so an ordinary terragrunt plan or terragrunt apply never creates cloud resources as a side effect of running.
Pass the flag on a run:
terragrunt apply --backend-bootstrap
Set the environment variable, which is usually what you want in CI:
export TG_BACKEND_BOOTSTRAP=true
Or bootstrap as a separate step, which keeps provisioning out of your normal apply path:
terragrunt backend bootstrap
The backend bootstrap command and the --backend-bootstrap flag do the same work. See State Backend for what gets created for each backend.
remote_state.disable_init blocks bootstrapping even when you have opted in. If you set it, Terragrunt skips creating backend resources regardless of the flag, while still letting OpenTofu/Terraform initialize a backend that already exists. That combination is useful for run --all validate in CI, where you want no resources created at all.
Note that the Azure backend is behind an experiment and Terragrunt does not bootstrap Azure resources yet.