When using “terragrunt init”, an error jumped out:

DEBU[0002] Remote state GCS bucket prokyon-systems-state-bucket does not exist. Attempting to create it  prefix=[/data/proj/prokyon-systems/auto-accountant/infra/non-prod/europe-central/dev/storage-bucket] 
ERRO[0002] Missing required GCS remote state configuration project 
ERRO[0002] Unable to determine underlying exit code, so Terragrunt will exit with error code 1

This error looks a little confusing because my attention was completely drawn by the “remote state configuration”. Where could I find the “remote state configuration”? Then I found it in “terragrunt.hcl”:

remote_state {
  backend = "gcs"
  config = {
    bucket  = "my_bucket"
    prefix  = "my_prefix/terraform.tfstate"
  }
}

Which “configuration” did I miss? I went through a long way to finally realize that the plain word “project” at the end of the sentence “Missing required GCS remote state configuration project” is the most important one (this article). I just need to add a configuration item “project” in the “terragrunt.hcl”:

remote_state {
  backend = "gcs"
  config = {
    project = "gcp_project_id"
    bucket  = "my_bucket"
    prefix  = "my_prefix/terraform.tfstate"
  }
}