Open pbusquemdf opened 5 years ago
In my experience, even using a different schemas, you get issues with state locking when using the same account.
If you have 50 projects, you would have 50 schema in your database. This is unefficent.
Just curious: why do you think it's inefficient? I have more than 50 schemas in one database, and everything seem to work OK, except, as @sdmorel mentioned, state locking issues (there is a workaround described in #22833 , I would like to try it).
Current Terraform Version
0.12.5
Use-cases
When using other remote backends, you have the possibility to specify some sort of storage area (container, buckets, etc), to reuse the same account.
With the PG backend, this is not possible. You can specify a different server, a different user or a different schema, but you cannot share the same account.
As a result, each terraform generation require their one user and schema to store 1 table containing 1 entry.
Attempted Solutions
Using different schema, but this is no efficient.
If you have 50 projects, you would have 50 schema in your database. This is unefficent.
Proposal
There should be a way to specify an "bucket" or container ID, that will be referenced as a column in the database. This would allow the reuse of the same account and table for multiple project.
References