The Module has a duplicate provider configuration.
For structures using Monorepo, the provider configuration is created only in the Terragrunt Root file.
As the provider configuration already exists in this module, it's duplicating, making it impossible to use with other Spot.io modules.
terragrunt init && terragrunt plan -lock=false
Initializing the backend...
There are some problems with the configuration, described below.
The Terraform configuration must be valid before initialization so that
Terraform can determine which modules and providers need to be installed.
╷
│ Error: Duplicate provider configuration
│
│ on providers.tf line 2:
│ 2: provider "spotinst" {
│
│ A default (non-aliased) provider configuration for "spotinst" was already
│ given at main.tf:1,1-20. If multiple configurations are required, set the
│ "alias" argument for alternative configurations.
╵
ERRO[0004] terraform invocation failed in /Users/victor/Developer/Intelipost/Github/sre-terragrunt-spot-io/intelipost/account/.terragrunt-cache/oPMk5En143TKn6VYj7Fo4cu-hxU/XMtmQELq8-UPRR-7mI9Rz0nM5Jo prefix=[/Users/victor/Developer/Intelipost/Github/sre-terragrunt-spot-io/intelipost/account]
ERRO[0004] 1 error occurred:
* [/Users/victor/Developer/Intelipost/Github/sre-terragrunt-spot-io/intelipost/account/.terragrunt-cache/oPMk5En143TKn6VYj7Fo4cu-hxU/XMtmQELq8-UPRR-7mI9Rz0nM5Jo] exit status 1
What you expected to happen:
Remove the provider configuration so that it is created using the Module.
How to reproduce it (as minimally and precisely as possible):
Create provider.tf or terragrunt.hcl (contains provider configuration);
What happened:
The Module has a duplicate provider configuration.
For structures using Monorepo, the provider configuration is created only in the Terragrunt Root file.
As the provider configuration already exists in this module, it's duplicating, making it impossible to use with other Spot.io modules.
What you expected to happen:
Remove the provider configuration so that it is created using the Module.
How to reproduce it (as minimally and precisely as possible):
Environment: