Backend must be defined


I have a terragrunt project setup with a folder structure near identical of for testing. When I run terragrunt init, I’m getting an error of You must define a backend block (it can be empty!). But the backend is defined in the terraform.tfvars. Do I also need to define it in something like

terragrunt = {
  # Configure Terragrunt to automatically store tfstate files in an S3 bucket
  remote_state {
    backend = "s3"

As the error says, you must have a backend "s3" {} block in your Terraform code—that is, the .tf files. See


Ah, but if all I’m looking to do is run all modules in a region, I don’t have to run terragrunt init from the root directory, and instead just use terragrunt plan-all


The plan-all command will run init automatically in each module. That doesn’t change the fact that in each module you must have an empty backend "s3" {} block defined. Otherwise, Terraform won’t configure a backend at all.

1 Like