Prior to 0.23.35 when I ran a terragunt init, the dependencies would also run a terragunt init using the same flags (like -upgrade=true) as the main command that are defined in an extra_arguments block in my terragunt config file.
The new dependency optimizations broke that, now the terragrunt init run on dependencies has no flags. This a big problem on my CI machine which tries to define a plugin-dir.
Thanks for reporting the bug. Working on a stop gap solution for now, which is to disable the dependency optimization by default and have a feature flag to enable it.
@unixninja92 https://github.com/gruntwork-io/terragrunt/releases/tag/v0.23.37 now has a feature flag to disable dependency optimization. We ended up flipping to on by default (see https://github.com/gruntwork-io/terragrunt/pull/1317#issuecomment-682041007 for thoughts on why).
You will need to set disable_dependency_optimization = true on your remote_state block to get the previous behavior.
Will keep this ticket open as the plan is to work on autodetection features to automatically disable dependency optimization if extra_arguments or hooks are configured for init.
Actually, thinking through this a bit more, I just realized that this may not be as big an issue as originally thought. The way the dependency optimization works is that it creates a temporary folder and generates the backend.tf file to have an empty terraform module that only contains the s3 backend configuration. It then runs terraform init && terraform output in there to pull down the remote state.
Since the temporary folder is an empty module, there should be no provider configuration or module sources it needs to download/init, which effectively means that the plugin directories should be left untouched (since there is no plugin to download).
Can you see if this is the case in your environment?
Your change in v0.23.38 fixes my use case by disabling plugin downloads on dependencies. It also speeds up terragrunt commands!