diff --git a/.goreleaser.yml b/.goreleaser.yml index ed571ba..35a51ab 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,4 +1,5 @@ # Visit https://goreleaser.com for documentation on how to customize this behavior. +version: 2 before: hooks: # this is just an example and not a requirement for provider building/publishing diff --git a/docs/data-sources/event_trigger.md b/docs/data-sources/event_trigger.md new file mode 100644 index 0000000..dca3864 --- /dev/null +++ b/docs/data-sources/event_trigger.md @@ -0,0 +1,34 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "postgresql_event_trigger Data Source - postgresql" +subcategory: "" +description: |- + Event Trigger is a PostgreSQL object that allows you to define a set of actions that should be executed when a certain event occurs. + They are are global objects for a particular database and are capable of capturing events from multiple tables. + (PostgreSQL Event Triggers)[https://www.postgresql.org/docs/current/event-triggers.html] +--- + +# postgresql_event_trigger (Data Source) + +Event Trigger is a PostgreSQL object that allows you to define a set of actions that should be executed when a certain event occurs. +They are are global objects for a particular database and are capable of capturing events from multiple tables. +(PostgreSQL Event Triggers)[https://www.postgresql.org/docs/current/event-triggers.html] + + + + +## Schema + +### Required + +- `database` (String) Name of the database where the event trigger is located +- `name` (String) Name of the event trigger + +### Read-Only + +- `comment` (String) Comment associated with the event trigger +- `enabled` (Boolean) Whether the event trigger is enabled +- `event` (String) The event that triggers the event trigger +- `exec_func` (String) The Function that will be executed when the event trigger fires +- `owner` (String) The owner of the event trigger +- `tags` (Set of String) List of command tags that the event trigger will respond to diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..ede17a6 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,79 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "postgresql Provider" +subcategory: "" +description: |- + Yet another Terraform provider for PostgreSQL. This one is built using the latest and suggested practices for + Terraform providers. That means it is built using the (Terraform Plugin Framework)[https://developer.hashicorp.com/terraform/plugin/framework]. + ❗ READ BEFORE USE + This provider is still in development and has a limited support for PostgreSQL resources.Check the 🏁 Roadmap for the list of supported resources. + 🏁 Roadmap + | Name | Resource | Data Source | + |---------------|:--------:|:-----------:| + | Event Trigger | ✅ | ✅ | + | Functions | 🔜 | 🔜 | + | Database | 🔜 | 🔜 | + | Schema | 🔜 | 🔜 | + | Role | 🔜 | 🔜 | +--- + +# postgresql Provider + +Yet another Terraform provider for PostgreSQL. This one is built using the latest and suggested practices for +Terraform providers. That means it is built using the (Terraform Plugin Framework)[https://developer.hashicorp.com/terraform/plugin/framework]. + +## ❗ READ BEFORE USE + +* This provider is still in development and has a limited support for PostgreSQL resources. +* Check the [🏁 Roadmap](#-roadmap) for the list of supported resources. + +## 🏁 Roadmap + +| Name | Resource | Data Source | +|---------------|:--------:|:-----------:| +| Event Trigger | ✅ | ✅ | +| Functions | 🔜 | 🔜 | +| Database | 🔜 | 🔜 | +| Schema | 🔜 | 🔜 | +| Role | 🔜 | 🔜 | + +## Example Usage + +```terraform +terraform { + required_providers { + postgresql = { + source = "registry.terraform.io/inventium-tech/postgresql" + } + } +} + +provider "postgresql" { + host = "localhost" + port = 5432 + username = "postgres" + password = "password" +} +``` + + +## Schema + +### Optional + +- `database` (String) The name of the PostgreSQL database to connect to. +- `host` (String) The hostname of the PostgreSQL server. Default is 5432) +- `max_idle_conn` (Number) Maximum number of idle connections to the database. Default is 5. +- `max_open_conn` (Number) Maximum number of open connections to the database. Default is 0. +- `password` (String, Sensitive) The password to use when connecting to the PostgreSQL server. +- `port` (Number) The port of the PostgreSQL server. +- `scheme` (String) The schema to use when connecting to the PostgreSQL database. The value must be one of the following: + * 'postgres' + * 'gcppostgres' + * 'awspostgres' +- `sslmode` (String) The SSL mode to use when connecting to the PostgreSQL server. The value must be one of the following: + * 'disable' (No SSL) + * 'require' (*default*. Always SSL, skip verification) + * 'verify-ca' (Always SSL, verify that the server certificate is issued by a trusted CA) + * 'verify-full' (Always SSL, *same as 'verify-ca', plus the server host name matches the one in the certificate) +- `username` (String) The username to use when connecting to the PostgreSQL server. diff --git a/docs/resources/event_trigger.md b/docs/resources/event_trigger.md new file mode 100644 index 0000000..b032f53 --- /dev/null +++ b/docs/resources/event_trigger.md @@ -0,0 +1,39 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "postgresql_event_trigger Resource - postgresql" +subcategory: "" +description: |- + Event Trigger is a PostgreSQL object that allows you to define a set of actions that should be executed when a certain event occurs. + They are are global objects for a particular database and are capable of capturing events from multiple tables. + (PostgreSQL Event Triggers)[https://www.postgresql.org/docs/current/event-triggers.html] +--- + +# postgresql_event_trigger (Resource) + +Event Trigger is a PostgreSQL object that allows you to define a set of actions that should be executed when a certain event occurs. +They are are global objects for a particular database and are capable of capturing events from multiple tables. +(PostgreSQL Event Triggers)[https://www.postgresql.org/docs/current/event-triggers.html] + + + + +## Schema + +### Required + +- `event` (String) The event that will trigger the event trigger +- `exec_func` (String) The function that will be executed when the event trigger fires +- `name` (String) Name of the event trigger + +### Optional + +- `comment` (String) Comment associated with the event trigger +- `database` (String) Name of the database where the event trigger is located. If not provided, the database from the provider configuration will be used. +- `enabled` (Boolean) Whether the event trigger is enabled +- `owner` (String) The owner of the event trigger +- `tags` (Set of String) List of command tags that the event trigger will respond to + +### Read-Only + +- `id` (String) The unique identifier for the event trigger, in the format `database_name.event_trigger_name` +- `last_updated` (String) The timestamp of the last modification of the event trigger