You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run terragrunt run-all plan for the first time it fails with below error:
time=2021-09-27T19:15:29Z level=info msg=Stack at squads/billing/billing-asia-golden-signals/production:
=> Module /apps/squads/billing/billing-asia-golden-signals/production (excluded: false, dependencies: [])
time=2021-09-27T19:15:30Z level=error msg=Module /apps/squads/billing/billing-asia-golden-signals/production has finished with an error: Found remote_state settings in /apps/squads/billing/billing-asia-golden-signals/production/terragrunt.hcl but no backend block in the Terraform code in /apps/squads/billing/billing-asia-golden-signals/production/.terragrunt-cache/jL-ok05zqKOgZxB9eaCJVfscinM/V6_t61o1qpIBPcpuPFw1qQ5n_hg/terraform/modules/golden-signals. You must define a backend block (it can be empty!) in your Terraform code or your remote state settings will have no effect! It should look something like this:
terraform {
backend "s3" {}
}
prefix=[/apps/squads/billing/billing-asia-golden-signals/production]
time=2021-09-27T19:15:30Z level=error msg=1 error occurred:
* Found remote_state settings in /apps/squads/billing/billing-asia-golden-signals/production/terragrunt.hcl but no backend block in the Terraform code in /apps/squads/billing/billing-asia-golden-signals/production/.terragrunt-cache/jL-ok05zqKOgZxB9eaCJVfscinM/V6_t61o1qpIBPcpuPFw1qQ5n_hg/terraform/modules/golden-signals. You must define a backend block (it can be empty!) in your Terraform code or your remote state settings will have no effect! It should look something like this:
terraform {
backend "s3" {}
}
time=2021-09-27T19:15:30Z level=error msg=Unable to determine underlying exit code, so Terragrunt will exit with error code 1
In the second attempt everything runs fine I guess it's because backend.tf is present.
I tried digging in code and I don't understand the reason behind https://github.com/gruntwork-io/terragrunt/blob/fed8039a6f08c2816bd18d6377c77b379ccbc345/cli/cli_app.go#L467 this check (is it possible to maybe disable it). I even tried adding empty backend block to my module but when I do that I get below error
Initializing the backend...
bucket
The name of the S3 bucket
Enter a value: ╷
│ Error: Error asking for input to configure backend "s3": bucket: EOF
│
│
╵
╷
│ Error: "region": required field is not set
│
│
╵
╷
│ Error: "key": required field is not set
│
│
╵
╷
│ Error: "bucket": required field is not set
│
│
╵
time=2021-09-27T18:53:51Z level=error msg=1 error occurred:
* exit status 1
make: *** [plan-all] Error 1
Even tried disable_init flag. Maybe I am doing something wrong or maybe there is a possible fix needed.
The text was updated successfully, but these errors were encountered:
Maybe this is a duplicate but I am confused about all answers.
I am using
terragrunt
version0.31.0
and terraform1.0.1
. My remote state settings are as follows:Above creates
backend.tf
like belowWhen I run
terragrunt run-all plan
for the first time it fails with below error:In the second attempt everything runs fine I guess it's because
backend.tf
is present.I tried digging in code and I don't understand the reason behind
https://github.com/gruntwork-io/terragrunt/blob/fed8039a6f08c2816bd18d6377c77b379ccbc345/cli/cli_app.go#L467
this check (is it possible to maybe disable it). I even tried adding empty backend block to my module but when I do that I get below errorEven tried
disable_init
flag. Maybe I am doing something wrong or maybe there is a possible fix needed.The text was updated successfully, but these errors were encountered: