terraform-provider-postgresql
terraform-provider-postgresql copied to clipboard
Support for postgresql_view resource
Hi,
In our PG database, there are a lot of views and it is hard to manage them. We're thinking if we can use Terraform to manage all the views in our PG database but after searching around I could not find something like postgresql_view resource.
Can we add suport for postgresql_view resource to the provider?
resource "postgresql_view" "my_pg_view" {
name = "my_pg_view"
schema = "my_pg_schema"
query = <<EOF
SELECT * FROM users WHERE age > 30;
EOF
}
Thanks!
Plus one for this feature request. Views are perfect to be deployed via terraform because they have no data.
I have created a PR for it here: https://github.com/cyrilgdn/terraform-provider-postgresql/pull/442 It's waiting for review now.