Usage of Multiple AWS Provider Configs in OIDC IAM Authentication

In the docs for dynamic credentials for AWS, the docs specify:

Specifying Multiple Configurations:

You can add additional configurations to handle multiple distinct AWS setups, enabling you to use multiple provider aliases within the same workspace.

It recommends the following code:

variable "tfc_aws_dynamic_credentials" {
  description = "Object containing AWS dynamic credentials configuration"
  type = object({
    default = object({
      shared_config_file = string
    })
    aliases = map(object({
      shared_config_file = string
    }))
  })
}

provider "aws" {
  shared_config_files = [var.tfc_aws_dynamic_credentials.default.shared_config_file]
}

provider "aws" {
  alias = "ALIAS1"
  shared_config_files = [var.tfc_aws_dynamic_credentials.aliases["ALIAS1"].shared_config_file]
}

Beyond this, it isn’t exactly clear what should be done here. It seems to suggest that as a user, I should create multiple AWS config files and simply point to them using this variable.

Is this the recommendation? And if so, is it possible to specify things like default tags and allowed account ids in the shared config files?

I’m wondering the same thing. Were you able to use this @naftulikay ?