Re:HashiCorp Did It Backwards
by jolux on Tuesday September 05, 2023 @07:48PM
(#37399430)
Or you can give people enough permissions to plan but not apply and leave applying to a restricted set of users...
[ Parent
| on HN ]
Re:HashiCorp Did It Backwards
by quickthrower2 on Tuesday September 05, 2023 @08:14PM
(#37399642)
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).