Open ekeric13 opened 1 year ago
Hi @ekeric13 ,
There's actually an owner
field in postgresql_schema
but the documentation is not up-to-date. I'll fix it.
But you can write:
resource "postgresql_schema" "test" {
name = "test"
owner = "test_user"
}
Actually it's up to date, so I'm not sure I had properly understood your question?
To be honest I forget too! But I think it might have been this:
I think it was if i have a pre-existing user, say "postgres", that made a pre-existing schema, say "test", and I want to change the owner to a new user, say "test_user", would it just be:
resource "postgresql_schema" "test" {
name = "test"
owner = "test_user"
}
I see there are ways to create schemas and update usage: https://registry.terraform.io/providers/cyrilgdn/postgresql/latest/docs/resources/postgresql_schema
Also grants: https://registry.terraform.io/providers/cyrilgdn/postgresql/latest/docs/resources/postgresql_grant
I don't see anything around ownership though