Hacker News new | ask | show | jobs
by jolux 1020 days ago
Or you can give people enough permissions to plan but not apply and leave applying to a restricted set of users...
2 comments

Also you can have laboratory cloud subscriptions seperate from production, where devs have full permissions.
That's tricky since the state file frequently contains secrets. You can try to keep secrets out of the state file but that's largely provider/resource dependent. For instance, if you create an AWS RDS Postgres database, the state ends up containing the resource password. If you allow only plans, users can still access the password in the state file.
For RDS you can change the password after creating the DB, or use the SecretsManager integration. There are similar workarounds for other providers and resources. I use TF without storing secrets in the state file (providers: AWS, kubernetes, helm, onepassword, datadog, auth0, and more).
You can exfiltrate secrets that aren't in the state, but are in accessible resources during a plan using an http data source with the secret encoded into the url