Account-map migration: Components with multiple aws providers / provider aliases that assume roles? #112
-
|
When migrating to the new account-map: How are we expected to configure auth for components that have multiple (aws) providers and use the account-map/iam-roles ? for example: https://github.com/cloudposse-terraform-components/aws-tgw-spoke/blob/main/src/provider-hub.tf#L8 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hey @seanlongnyc. Good question. This is one of the trickier parts of the migration. For components that need multiple AWS providers (like So the workflow is log in with Atmos to the alternate identity first (which creates the profile in your local AWS config), and then when you run Atmos for the target component, the alternate provider can reference that profile by name. For a working example, take a look at how the That said, this clearly isn't ideal. We would like to support multiple identities for a single component natively in Atmos (so you wouldn't need to pre-authenticate separately), but that is not yet implemented. For now, the profile-based approach is the recommended workaround. |
Beta Was this translation helpful? Give feedback.
Hey @seanlongnyc. Good question. This is one of the trickier parts of the migration.
For components that need multiple AWS providers (like
dns-delegatedneeding access to the primary DNS account, or the oldtgw-spokeneeding access to the hub account), the approach in v2 is to specify the AWSprofilefor the alternate provider directly. The key is that the profile must already be initialized in your local AWS config, meaning you've already authenticated to that alternate identity viaatmos auth loginbefore running Atmos against the target identity. Therefore, for now we have to disable those components from GitHub ActionsSo the workflow is log in with Atmos to the alternate identity fir…