Methods for getting AWS account IDs
Grab theBasic ~/.aws/config for AdministratorAccess from 1password.
In the management/root account
github-actions-trust-policy.json for Github Actions role in the root/management account for the unkeyed/infra:* repo for all (*) branches. This already has the ARN from the above command in place.
cross-account-policy.json. Note: This renders like it didn’t interpolate the *_ACCOUNT vars, but less cross-account-policy.json will show it correctly.
The Pulumi Executor role
This one is a bit of a doozy… You’ll have to do this for EACH account… I’ve tried to streamline/automate most of it, but be mindful and RTFM closely! First, get the SSO role ID forAdministratorAccess for each account in {sandbox,canary,production001}
AdministratorAccess role.. this is what sandbox’s role ARN looks like…
pulumi-executor-<ACCOUNT>-trust-policy.json we’ll create… this policy says that anyone with the AWSReservedSSO_AdministratorAccess_* role from <ACCOUNT_NAME> and the GithubActionsOIDCRole from the root/management account can assume this role.
unkey-pulumi-policy.json. (Just once!)

