hashicorp / terraform-dynamic-credentials-setup-examples

Example code for bootstrapping trust between Terraform Cloud and cloud providers in order to use TFC's Workload Identity

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dynamic Credentials with multiple AWS providers

efrodriguez opened this issue · comments

This is not an issue per se, but does the dynamic credentials feature supports multiple AWS providers? I played with it already and it works fine but haven't been able to figure out how to configure multiple AWS providers with different roles. The documentation is lacking on this front and I assume it might be due the feature being in Beta release.

UPDATE: For anyone coming across this issue, Hashicorp said they will be addressing this issue and they plan on supporting multiple AWS providers with dynamic credentials.

I would imagine this would work the same way as Identity Center does, where there's an identity provider configured, then multiple IAM roles with a trust for that specific Identity provider. Hopefully it comes out soon.

FYI @efrodriguez @diogozedan as of today support for multiple configurations for dynamic credentials on a per-provider basis is generally available in TFC (which allows for multiple distinct accounts / roles / etc. to be used for multiple AWS provider aliases).

The examples have been updated to give an overview of the environment variable format needed for this in #25.

Blog post around this functionality: https://www.hashicorp.com/blog/terraform-cloud-now-supports-multiple-configurations-for-dynamic-provider-credent
Top level docs: https://developer.hashicorp.com/terraform/cloud-docs/workspaces/dynamic-provider-credentials/specifying-multiple-configurations
AWS provider specific docs:https://developer.hashicorp.com/terraform/cloud-docs/workspaces/dynamic-provider-credentials/aws-configuration#specifying-multiple-configurations