Skip to content

Terragrunt, assume_role and multi-region modules: NoCredentialProviders #41

Answered by zackproser
zackproser asked this question in Help
Discussion options

You must be logged in to vote

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.

generate "providers" {
  path      = "providers.tf"
  if_exists = "overwrite"
  c…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zackproser
Comment options

Answer selected by zackproser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant