Hi,
i am using terraform + terragrunt to deploy the infra.
here is the directory structure i have .
resource-group/
service-bus/
terragrunt.hcl
i am using remote backend to store the state files . here is the configuration.
remote_state {
backend = "azurerm"
config = {
key = "${path_relative_to_include()}/terraform.tfstate"
resource_group_name = "ABC-QA-RG"
storage_account_name = "strgacct"
container_name = "tfstate"
subscription_id = "sadsadsads45435c59"
}
}
inputs = {
location = "East US"
subs_id = "fsdfdsfdsfdsf-sdfdsfdsf-6-4250b797bc59"
tenant_id = "sdfdsfdsf67657657-546546"
}
the issue is , i have just moved the development environment to some other machine and copy/paste the above folder structure as it is .
now, in the parent folder , when i run the command terragrunt plan-all
it fails , saying that , you need to initialize the terraform.
as per doc : Backend Configuration - Configuration Language | Terraform | HashiCorp Developer , it says, just run the command terraform init
and everything will be initialized.
As per my understanding , i expect terraform / terragrunt to get the state of infra from the remote backend and start the execution without error . is that correct ?
please suggest / help what needs to be done to resolve the error .