Closed onefourfive closed 2 weeks ago
Thanks for raising this issue! FYI @remilapeyre.
Hi @onefourfive,
It seems like everything is working as intended. I believe you might be confusing schema
with database
. To change the database name, you can use the PGDATABASE variable instead.
The pg backend supports the standard libpq environment variables.
From documentation:
dbname The database name. Defaults to be the same as the user name.
Since we have not heard back in a while I'm going to close the issue. If you have any updates regarding the issue, feel free to open a new issue with the requested information. If you have more questions, you can also use the community forum where there are more people ready to help.
Thanks!
Terraform Version
Terraform Configuration Files
Debug Output
Expected Behavior
Terraform should read
PG_SCHEMA_NAME
as specified in documentationActual Behavior
Terraform reuses the value of
PGUSER
for schema, leading to errorSteps to Reproduce
PGUSER
PGPASSWORD
PG_SCHEMA_NAME
PGHOST
terraform init
orterraform plan
.Additional Context
Setting these all in
PG_CONN_STR
works fine, but this is not deemed required by the documentation. I'd prefer to use the separate variables for cleaner templating.References
No response