Is there a way to predict required iam permissions...
# aws
g
Is there a way to predict required iam permissions before the
pulumi up
? I tried this https://github.com/iann0036/iamlive but it only gave me wildcard masks for the resource instead of `arn`s
s
Practically speaking, I have found that you really need to grant full admin in AWS to any IaC because you need full admin to create IAM resources, and things like Lambdas require IAM roles.
l
Once your project is deployed, has been in use for a while, and is stable, you can then use IAM Access Advisor to see what permissions your projects actually used (assuming you use a single role to deploy your entire project). You can then update your role to be limited to those permissions. Also, you can often split the admin-only aspects of your deployment from the "normal" IaC. Setting up the base IAM stuff, including OIDC for GH/Pulumi, is a good example of work that should be separate from, and use a different role to, your normal IaC work.
g
Yeah, I split admin deploy vs App deploy with OIDC so that app devs aren't bothered with extra stuff in the repo. And full infra repo is accessible only by a few members. I am try to avoid full admin for CI as much as possible. One of the ideas was to force manual deployment of IAM stuff.
I was hoping there was some progress in tech I missed
l
OIDC? I get a lot of confidence from the GH->AWS OIDC integration.
g
This is our setup: • main infra repo (many apps) -> GH -> AWS OIDC -> full role -> pulumi Up • app repo -> main infra/app -> GH -> AWS OIDC -> app role -> pulumi Up