Sitemap

Unknown variable; There is no variable named “dependency”.

2 min readJun 26, 2025

This is a very irritating error.

It can happen when you have upgraded your terraform version but your terragrunt needs to be realigned by doing a terragrunt init -reconfigure.

It happens because you are having terragrunt code which also depends on another terragrunt code base for another item and that again depneds on another and so on or so forth. You need to apply terragrunt init -reconfigure starting from the very root level of terragrunt code base.

In other words, when terraform has been upgraded and then you do a terragrunt init -reconfigure from a code base which in turn depends on another terragrunt code base where you haven’t yet performed terragrunt init -reconfigure. I hope you get my point :-D

The error is below and the fix I already mentioned above.

* Failed to execute "terraform output -json" in ../eks-addons/.terragrunt-cache/gIR_YCILJNsp_YLP7IfkONbWAF4/Q3Q5hDy33J4QeP0sbVYykBj4Wrs

│ Error: Backend initialization required: please run "terraform init"

│ Reason: Backend configuration block has changed

│ The "backend" is the interface that Terraform uses to store state,
│ perform operations, etc. If this message is showing up, it means that the
│ Terraform configuration you're using is using a custom configuration for
│ the Terraform backend.

│ Changes to backend configurations require reinitialization. This allows
│ Terraform to set up the new configuration, copy existing state, etc. Please
│ run
│ "terraform init" with either the "-reconfigure" or "-migrate-state" flags
│ to
│ use the current configuration.

│ If the change reason above is incorrect, please verify your configuration
│ hasn't changed and try again. At this point, no changes to your existing
│ configuration or state have been made.


exit status 1

* ./terragrunt.hcl:58,23-33: Unknown variable; There is no variable named "dependency"., and 4 other diagnostic(s)

--

--