Terragrunt, assume_role and multi-region modules: NoCredentialProviders #41
-
A customer asked:
We have only two opt-in regions:
The error occuring for each region:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The issue here is that the assume_role block will always be processed on the provider even when the region is disabled. This is indicated by the error arising for the provider block for af_south_1, which is not in your opt in list.
To fix this, you need to update that generate block to use the if directive (https://www.terraform.io/docs/language/expressions/strings.html#directives) to only render out the assume_role block for the opt in regions.
|
Beta Was this translation helpful? Give feedback.
The issue here is that the assume_role block will always be processed on the provider even when the region is disabled. This is indicated by the error arising for the provider block for af_south_1, which is not in your opt in list.
af-south-1
is one of those regions you must also "opt-in" to within AWS. You probably have that disabled in your account and the provider is failing the assume role.To fix this, you need to update that generate block to use the if directive (https://www.terraform.io/docs/language/expressions/strings.html#directives) to only render out the assume_role block for the opt in regions.