gruntwork-io / terragrunt

Terragrunt is a flexible orchestration tool that allows Infrastructure as Code written in OpenTofu/Terraform to scale.
https://terragrunt.gruntwork.io/
MIT License
8.01k stars 971 forks source link

regression, replace-provider broken in 0.35.7 and later #1969

Open ghost opened 2 years ago

ghost commented 2 years ago

This is a similar issue to issue https://github.com/gruntwork-io/terragrunt/issues/1545 , using tgswitch I narrowed down that it works correctly in version 0.35.6, but is broken in 0.35.7 later, throwing the following error when trying to run replace-provider on phpipam.

Error: Failed to install provider

Error while installing hashicorp/phpipam: provider registry
registry.terraform.io does not have a provider named
registry.terraform.io/hashicorp/phpipam

Error: Failed to install provider

Error while installing -/phpipam: provider registry registry.terraform.io does
not have a provider named registry.terraform.io/-/phpipam

ERRO[0008] 1 error occurred:
        * exit status 1
denis256 commented 2 years ago

Hi @tmashos, can be shared example HCL/Terraform files, executed terragrunt command

ghost commented 2 years ago

Hi @denis256 ,

I actually found the above error was from trying to have multiple terraform {} blocks. When I move it back to a single block, I get the exact same error as in the other thread.