-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature-1 || add README for modules and examples
- Loading branch information
Ridwan Fadjar
committed
Dec 26, 2023
1 parent
288e7f9
commit 47c5096
Showing
10 changed files
with
439 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Basic PostgreSQL config example | ||
|
||
## Usage | ||
|
||
To run this example you need to execute: | ||
|
||
``` | ||
$ terraform init | ||
$ terraform plan | ||
$ terraform apply | ||
``` | ||
|
||
## Requirements | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.4 | | ||
| <a name="requirement_postgresql"></a> [postgresql](#requirement\_postgresql) | 1.21.0 | | ||
| <a name="requirement_random"></a> [random](#requirement\_random) | 3.5.1 | | ||
|
||
## Providers | ||
|
||
No providers. | ||
|
||
## Modules | ||
|
||
| Name | Source | Version | | ||
|------|--------|---------| | ||
| <a name="module_tf_postgres_config"></a> [tf\_postgres\_config](#module\_tf\_postgres\_config) | ../../modules/config | n/a | | ||
|
||
## Resources | ||
|
||
No resources. | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|------|---------|:--------:| | ||
| <a name="input_postgres_extension"></a> [postgres\_extension](#input\_postgres\_extension) | n/a | `list(any)` | `[]` | no | | ||
| <a name="input_postgres_physical_replication_slots"></a> [postgres\_physical\_replication\_slots](#input\_postgres\_physical\_replication\_slots) | n/a | `list(any)` | `[]` | no | | ||
| <a name="input_postgres_replication_slots"></a> [postgres\_replication\_slots](#input\_postgres\_replication\_slots) | n/a | `list(any)` | `[]` | no | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| <a name="output_postgres_extension"></a> [postgres\_extension](#output\_postgres\_extension) | Current PostgreSQL Extensions | | ||
<!-- END_TF_DOCS --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Basic PostgreSQL database and schema example | ||
|
||
## Usage | ||
|
||
To run this example you need to execute: | ||
|
||
``` | ||
$ terraform init | ||
$ terraform plan | ||
$ terraform apply | ||
``` | ||
|
||
## Requirements | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.4 | | ||
| <a name="requirement_postgresql"></a> [postgresql](#requirement\_postgresql) | 1.21.0 | | ||
| <a name="requirement_random"></a> [random](#requirement\_random) | 3.5.1 | | ||
|
||
## Providers | ||
|
||
No providers. | ||
|
||
## Modules | ||
|
||
| Name | Source | Version | | ||
|------|--------|---------| | ||
| <a name="module_tf_postgres_database"></a> [tf\_postgres\_database](#module\_tf\_postgres\_database) | ../../modules/database | n/a | | ||
|
||
## Resources | ||
|
||
No resources. | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|------|---------|:--------:| | ||
| <a name="input_postgres_databases"></a> [postgres\_databases](#input\_postgres\_databases) | n/a | `list(any)` | `[]` | no | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| <a name="output_postgres_databases"></a> [postgres\_databases](#output\_postgres\_databases) | Current PostgreSQL databases | | ||
| <a name="output_postgres_schemas"></a> [postgres\_schemas](#output\_postgres\_schemas) | Current PostgreSQL schemas | | ||
<!-- END_TF_DOCS --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Basic PostgreSQL grant example | ||
|
||
## Usage | ||
|
||
To run this example you need to execute: | ||
|
||
``` | ||
$ terraform init | ||
$ terraform plan | ||
$ terraform apply | ||
``` | ||
|
||
## Requirements | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.4 | | ||
| <a name="requirement_postgresql"></a> [postgresql](#requirement\_postgresql) | 1.21.0 | | ||
| <a name="requirement_random"></a> [random](#requirement\_random) | 3.5.1 | | ||
|
||
## Providers | ||
|
||
No providers. | ||
|
||
## Modules | ||
|
||
| Name | Source | Version | | ||
|------|--------|---------| | ||
| <a name="module_tf_postgres_grant"></a> [tf\_postgres\_grant](#module\_tf\_postgres\_grant) | ../../modules/grant | n/a | | ||
|
||
## Resources | ||
|
||
No resources. | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|------|---------|:--------:| | ||
| <a name="input_pg_grant_roles"></a> [pg\_grant\_roles](#input\_pg\_grant\_roles) | n/a | `list(any)` | `[]` | no | | ||
| <a name="input_pg_grants"></a> [pg\_grants](#input\_pg\_grants) | n/a | `list(any)` | `[]` | no | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| <a name="output_pg_grant_roles"></a> [pg\_grant\_roles](#output\_pg\_grant\_roles) | Current PostgreSQL grant roles | | ||
| <a name="output_pg_grants"></a> [pg\_grants](#output\_pg\_grants) | Current PostgreSQL grants | | ||
<!-- END_TF_DOCS --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Basic PostgreSQL role example | ||
|
||
## Usage | ||
|
||
To run this example you need to execute: | ||
|
||
``` | ||
$ terraform init | ||
$ terraform plan | ||
$ terraform apply | ||
``` | ||
|
||
## Requirements | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.4 | | ||
| <a name="requirement_postgresql"></a> [postgresql](#requirement\_postgresql) | 1.21.0 | | ||
| <a name="requirement_random"></a> [random](#requirement\_random) | 3.5.1 | | ||
|
||
## Providers | ||
|
||
No providers. | ||
|
||
## Modules | ||
|
||
| Name | Source | Version | | ||
|------|--------|---------| | ||
| <a name="module_tf_postgres_role"></a> [tf\_postgres\_role](#module\_tf\_postgres\_role) | ../../modules/role | n/a | | ||
|
||
## Resources | ||
|
||
No resources. | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|------|---------|:--------:| | ||
| <a name="input_postgres_roles"></a> [postgres\_roles](#input\_postgres\_roles) | n/a | `list(any)` | `[]` | no | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| <a name="output_postgres_roles"></a> [postgres\_roles](#output\_postgres\_roles) | Current PostgreSQL roles | | ||
<!-- END_TF_DOCS --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Terraform-PostgreSQL-Admin for managing config | ||
|
||
## Requirements | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.4 | | ||
| <a name="requirement_postgresql"></a> [postgresql](#requirement\_postgresql) | 1.21.0 | | ||
| <a name="requirement_random"></a> [random](#requirement\_random) | 3.5.1 | | ||
|
||
## Providers | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="provider_postgresql"></a> [postgresql](#provider\_postgresql) | 1.21.0 | | ||
|
||
## Modules | ||
|
||
No modules. | ||
|
||
## Resources | ||
|
||
| Name | Type | | ||
|------|------| | ||
| [postgresql_extension.extensions](https://registry.terraform.io/providers/cyrilgdn/postgresql/1.21.0/docs/resources/extension) | resource | | ||
| [postgresql_physical_replication_slot.physical_slots](https://registry.terraform.io/providers/cyrilgdn/postgresql/1.21.0/docs/resources/physical_replication_slot) | resource | | ||
| [postgresql_replication_slot.slots](https://registry.terraform.io/providers/cyrilgdn/postgresql/1.21.0/docs/resources/replication_slot) | resource | | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|------|---------|:--------:| | ||
| <a name="input_extensions"></a> [extensions](#input\_extensions) | n/a | <pre>list(object({<br> name = string<br> schema = optional(string)<br> version = optional(string)<br> database = optional(string)<br> drop_cascade = optional(bool)<br> create_cascade = optional(bool)<br> }))</pre> | n/a | yes | | ||
| <a name="input_physical_replication_slots"></a> [physical\_replication\_slots](#input\_physical\_replication\_slots) | n/a | <pre>list(object({<br> name = string<br> }))</pre> | n/a | yes | | ||
| <a name="input_replication_slots"></a> [replication\_slots](#input\_replication\_slots) | n/a | <pre>list(object({<br> name = string<br> plugin = string<br> database = optional(string)<br> }))</pre> | n/a | yes | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| <a name="output_postgres_extensions"></a> [postgres\_extensions](#output\_postgres\_extensions) | List of PostgreSQL extensions | | ||
| <a name="output_postgres_physical_replication_slots"></a> [postgres\_physical\_replication\_slots](#output\_postgres\_physical\_replication\_slots) | List of PostgreSQL physical replication slots | | ||
| <a name="output_postgres_replication_slots"></a> [postgres\_replication\_slots](#output\_postgres\_replication\_slots) | List of PostgreSQL replication slots | | ||
<!-- END_TF_DOCS --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Terraform-PostgreSQL-Admin for managing database | ||
|
||
## Requirements | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.4 | | ||
| <a name="requirement_postgresql"></a> [postgresql](#requirement\_postgresql) | 1.21.0 | | ||
| <a name="requirement_random"></a> [random](#requirement\_random) | 3.5.1 | | ||
|
||
## Providers | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="provider_postgresql"></a> [postgresql](#provider\_postgresql) | 1.21.0 | | ||
|
||
## Modules | ||
|
||
No modules. | ||
|
||
## Resources | ||
|
||
| Name | Type | | ||
|------|------| | ||
| [postgresql_database.databases](https://registry.terraform.io/providers/cyrilgdn/postgresql/1.21.0/docs/resources/database) | resource | | ||
| [postgresql_schema.schemas](https://registry.terraform.io/providers/cyrilgdn/postgresql/1.21.0/docs/resources/schema) | resource | | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|------|---------|:--------:| | ||
| <a name="input_databases"></a> [databases](#input\_databases) | n/a | <pre>list(object({<br> name = string<br> owner = optional(string)<br> tablespace_name = optional(string)<br> connection_limit = optional(number)<br> allow_connections = optional(bool)<br> is_template = optional(bool)<br> template = optional(string)<br> encoding = optional(string)<br> lc_collate = optional(string)<br> lc_ctype = optional(string)<br> <br> schemas = optional(list(object({<br> name = string<br> owner = optional(string)<br> database = optional(string)<br> drop_cascade = optional(bool)<br> policies = optional(list(object({<br> role = optional(string)<br> create = optional(bool)<br> create_with_grant = optional(bool)<br> usage = optional(bool)<br> usage_with_grant = optional(bool)<br> })))<br> })))<br> }))</pre> | n/a | yes | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| <a name="output_postgres_databases"></a> [postgres\_databases](#output\_postgres\_databases) | List of PostgreSQL databases | | ||
| <a name="output_postgres_schemas"></a> [postgres\_schemas](#output\_postgres\_schemas) | List of PostgreSQL schemas | | ||
<!-- END_TF_DOCS --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Terraform-PostgreSQL-Admin for managing FDW | ||
|
||
## Requirements | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.4 | | ||
| <a name="requirement_postgresql"></a> [postgresql](#requirement\_postgresql) | 1.21.0 | | ||
| <a name="requirement_random"></a> [random](#requirement\_random) | 3.5.1 | | ||
|
||
## Providers | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="provider_postgresql"></a> [postgresql](#provider\_postgresql) | 1.21.0 | | ||
|
||
## Modules | ||
|
||
No modules. | ||
|
||
## Resources | ||
|
||
| Name | Type | | ||
|------|------| | ||
| [postgresql_server.fdw_servers](https://registry.terraform.io/providers/cyrilgdn/postgresql/1.21.0/docs/resources/server) | resource | | ||
| [postgresql_user_mapping.fdw_user_mappings](https://registry.terraform.io/providers/cyrilgdn/postgresql/1.21.0/docs/resources/user_mapping) | resource | | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|------|---------|:--------:| | ||
| <a name="input_fdw_servers"></a> [fdw\_servers](#input\_fdw\_servers) | n/a | <pre>list(object({<br> server_name = string<br> fdw_name = string<br> options = optional(map(any))<br> server_type = optional(string)<br> server_version = optional(string)<br> server_owner = optional(string)<br> drop_cascade = optional(bool)<br> }))</pre> | n/a | yes | | ||
| <a name="input_fdw_user_mappings"></a> [fdw\_user\_mappings](#input\_fdw\_user\_mappings) | n/a | <pre>list(object({<br> user_name = string<br> server_name = string<br> options = optional(map(any))<br> }))</pre> | n/a | yes | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| <a name="output_postgres_fdw_servers"></a> [postgres\_fdw\_servers](#output\_postgres\_fdw\_servers) | List of PostgreSQL FDW servers | | ||
| <a name="output_postgres_fdw_user_mappings"></a> [postgres\_fdw\_user\_mappings](#output\_postgres\_fdw\_user\_mappings) | List of PostgreSQL FDW user mappings | | ||
<!-- END_TF_DOCS --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Terraform-PostgreSQL-Admin for managing grant | ||
|
||
## Requirements | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.4 | | ||
| <a name="requirement_postgresql"></a> [postgresql](#requirement\_postgresql) | 1.21.0 | | ||
| <a name="requirement_random"></a> [random](#requirement\_random) | 3.5.1 | | ||
|
||
## Providers | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="provider_postgresql"></a> [postgresql](#provider\_postgresql) | 1.21.0 | | ||
|
||
## Modules | ||
|
||
No modules. | ||
|
||
## Resources | ||
|
||
| Name | Type | | ||
|------|------| | ||
| [postgresql_grant.grants](https://registry.terraform.io/providers/cyrilgdn/postgresql/1.21.0/docs/resources/grant) | resource | | ||
| [postgresql_grant_role.grant_roles](https://registry.terraform.io/providers/cyrilgdn/postgresql/1.21.0/docs/resources/grant_role) | resource | | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|------|---------|:--------:| | ||
| <a name="input_grant_roles"></a> [grant\_roles](#input\_grant\_roles) | n/a | <pre>list(object({<br> role = string<br> grant_role = string<br> with_admin_option = optional(bool)<br> }))</pre> | n/a | yes | | ||
| <a name="input_grants"></a> [grants](#input\_grants) | n/a | <pre>list(object({<br> role = string<br> database = string<br> schema = string<br> object_type = string<br> privileges = list(string)<br> objects = optional(list(string))<br> columns = optional(list(string))<br> with_grant_option = optional(bool)<br> }))</pre> | n/a | yes | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| <a name="output_postgres_grant_roles"></a> [postgres\_grant\_roles](#output\_postgres\_grant\_roles) | List of PostgreSQL grant roles | | ||
| <a name="output_postgres_grants"></a> [postgres\_grants](#output\_postgres\_grants) | List of PostgreSQL grants | | ||
<!-- END_TF_DOCS --> |
Oops, something went wrong.