Pulumi project to manage identity resources.
-
Create a role
identity-deployerwith the following managed policies:IAMFullAccessAWSKeyManagementServicePowerUser
and the following trust policy:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS": "400689721046" }, "Action": "sts:AssumeRole" }, { "Effect": "Allow", "Principal": { "Federated": "arn:aws:iam::400689721046:oidc-provider/token.actions.githubusercontent.com" }, "Action": "sts:AssumeRoleWithWebIdentity", "Condition": { "StringEquals": { "token.actions.githubusercontent.com:aud": "sts.amazonaws.com" }, "StringLike": { "token.actions.githubusercontent.com:sub": "repo:ameier38/infrastructure:*" } } } ] } -
Create a policy
assume-identity-deployer:{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "sts:AssumeRole", "Resource": "arn:aws:iam::400689721046:role/identity-deployer" } ] } -
Create an
adminuser with theassume-identity-deployerpolicy attached. -
Add
adminuser keys to~/.aws/credentialsfile. -
Add profile to assume
identity-deployerrole to~/.aws/configfile.
Make sure you have assumed the identity-deployer AWS role.
Preview changes.
pulumi preview
Apply changes.
pulumi up