Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jindraj committed Feb 12, 2024
1 parent 86d7d00 commit e3c9897
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 70 deletions.
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ module "example" {
source = "<module-path>"
# Required variables
database_private_hostname =
databases =
user_role =
database =
# Optional variables
create_access_user = false
app_username = null
owner_username = null
role_ro_name = null
role_rw_name = null
}
```

Expand All @@ -28,17 +29,17 @@ No resources.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_create_access_user"></a> [create\_access\_user](#input\_create\_access\_user) | Create access user | `bool` | `false` | no |
| <a name="input_database_private_hostname"></a> [database\_private\_hostname](#input\_database\_private\_hostname) | Hostname used in connection\_url output | `string` | n/a | yes |
| <a name="input_databases"></a> [databases](#input\_databases) | databases object: { ACCESS\_USER = { database = "DBNAME" roles = [ "ROLE1"] } … } | <pre>map(object({<br> database = string<br> roles = list(string)<br> }))</pre> | n/a | yes |
| <a name="input_user_role"></a> [user\_role](#input\_user\_role) | users object: { "USERNAME" = { "roles" = [ "ROLE1", … ] } … } | <pre>map(object({<br> roles = list(string)<br> }))</pre> | n/a | yes |
| <a name="input_app_username"></a> [app\_username](#input\_app\_username) | Application username | `string` | `null` | no |
| <a name="input_database"></a> [database](#input\_database) | Database name | `string` | n/a | yes |
| <a name="input_owner_username"></a> [owner\_username](#input\_owner\_username) | Database owner | `string` | `null` | no |
| <a name="input_role_ro_name"></a> [role\_ro\_name](#input\_role\_ro\_name) | Read-only role name | `string` | `null` | no |
| <a name="input_role_rw_name"></a> [role\_rw\_name](#input\_role\_rw\_name) | Read-write role name | `string` | `null` | no |
## Outputs

| Name | Description |
|------|-------------|
| <a name="output_connection_url"></a> [connection\_url](#output\_connection\_url) | Object returning connection strings |
| <a name="output_app_user"></a> [app\_user](#output\_app\_user) | Object returning application user and its credentials |
| <a name="output_database_name"></a> [database\_name](#output\_database\_name) | Object returning database names |
| <a name="output_database_owner"></a> [database\_owner](#output\_database\_owner) | Object returning database owners and their credentials |
| <a name="output_password"></a> [password](#output\_password) | Object returning usersnames and their passwords |
| <a name="output_username"></a> [username](#output\_username) | Object returning usersnames |
| <a name="output_owner_user"></a> [owner\_user](#output\_owner\_user) | Object returning database owner and its credentials |
| <a name="output_roles"></a> [roles](#output\_roles) | List of additional roles having permission on the database |
<!-- END_AUTOMATED_TF_DOCS_BLOCK -->
49 changes: 30 additions & 19 deletions modules/access/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,54 @@

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0, < 2.0.0 |
| <a name="requirement_postgresql"></a> [postgresql](#requirement\_postgresql) | 1.19.0 |
| <a name="requirement_random"></a> [random](#requirement\_random) | 3.4.3 |
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.0, < 2.0.0 |
| <a name="requirement_postgresql"></a> [postgresql](#requirement\_postgresql) | ~> 1.21 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.6.0 |

Basic usage of this module is as follows:

```hcl
module "example" {
source = "<module-path>"
source = "<module-path>"
# Required variables
access_map =
access_user =
db_name =
db_owner =
access_map =
allow_login =
database_name =
database_owner =
role_name =
# Optional variables
create_role = false
}
```

## Resources

| Name | Type |
|------|------|
| [postgresql_default_privileges.sequences](https://registry.terraform.io/providers/cyrilgdn/postgresql/1.19.0/docs/resources/default_privileges) | resource |
| [postgresql_default_privileges.tables](https://registry.terraform.io/providers/cyrilgdn/postgresql/1.19.0/docs/resources/default_privileges) | resource |
| [postgresql_grant.database](https://registry.terraform.io/providers/cyrilgdn/postgresql/1.19.0/docs/resources/grant) | resource |
| [postgresql_grant.schema](https://registry.terraform.io/providers/cyrilgdn/postgresql/1.19.0/docs/resources/grant) | resource |
| [postgresql_grant.sequence](https://registry.terraform.io/providers/cyrilgdn/postgresql/1.19.0/docs/resources/grant) | resource |
| [postgresql_grant.tables](https://registry.terraform.io/providers/cyrilgdn/postgresql/1.19.0/docs/resources/grant) | resource |
| [postgresql_default_privileges.sequences](https://registry.terraform.io/providers/cyrilgdn/postgresql/latest/docs/resources/default_privileges) | resource |
| [postgresql_default_privileges.tables](https://registry.terraform.io/providers/cyrilgdn/postgresql/latest/docs/resources/default_privileges) | resource |
| [postgresql_grant.database](https://registry.terraform.io/providers/cyrilgdn/postgresql/latest/docs/resources/grant) | resource |
| [postgresql_grant.schema](https://registry.terraform.io/providers/cyrilgdn/postgresql/latest/docs/resources/grant) | resource |
| [postgresql_grant.sequence](https://registry.terraform.io/providers/cyrilgdn/postgresql/latest/docs/resources/grant) | resource |
| [postgresql_grant.tables](https://registry.terraform.io/providers/cyrilgdn/postgresql/latest/docs/resources/grant) | resource |
| [postgresql_role.this](https://registry.terraform.io/providers/cyrilgdn/postgresql/latest/docs/resources/role) | resource |
| [random_password.this](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password) | resource |
## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_access_map"></a> [access\_map](#input\_access\_map) | n/a | <pre>object({<br> table_rights = list(string)<br> sequence_rights = list(string)<br> schema_rights = list(string)<br> database_rights = list(string)<br> }<br> )</pre> | n/a | yes |
| <a name="input_access_user"></a> [access\_user](#input\_access\_user) | grantee user | `string` | n/a | yes |
| <a name="input_db_name"></a> [db\_name](#input\_db\_name) | database name | `string` | n/a | yes |
| <a name="input_db_owner"></a> [db\_owner](#input\_db\_owner) | database owner | `string` | n/a | yes |
| <a name="input_allow_login"></a> [allow\_login](#input\_allow\_login) | n/a | `bool` | n/a | yes |
| <a name="input_create_role"></a> [create\_role](#input\_create\_role) | create role | `bool` | `false` | no |
| <a name="input_database_name"></a> [database\_name](#input\_database\_name) | database name | `string` | n/a | yes |
| <a name="input_database_owner"></a> [database\_owner](#input\_database\_owner) | database owner | `string` | n/a | yes |
| <a name="input_role_name"></a> [role\_name](#input\_role\_name) | grantee user | `string` | n/a | yes |
## Outputs

No outputs.
| Name | Description |
|------|-------------|
| <a name="output_password"></a> [password](#output\_password) | n/a |
| <a name="output_rolename"></a> [rolename](#output\_rolename) | n/a |
<!-- END_AUTOMATED_TF_DOCS_BLOCK -->
37 changes: 18 additions & 19 deletions modules/database/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,44 @@

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0, < 2.0.0 |
| <a name="requirement_postgresql"></a> [postgresql](#requirement\_postgresql) | 1.19.0 |
| <a name="requirement_random"></a> [random](#requirement\_random) | 3.4.3 |
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.0, < 2.0.0 |
| <a name="requirement_postgresql"></a> [postgresql](#requirement\_postgresql) | ~> 1.21 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.6.0 |

Basic usage of this module is as follows:

```hcl
module "example" {
source = "<module-path>"
source = "<module-path>"
# Required variables
database_private_hostname =
database_name =
# Optional variables
databases = []
owner_username = null
}
```

## Resources

| Name | Type |
|------|------|
| [postgresql_database.databases](https://registry.terraform.io/providers/cyrilgdn/postgresql/1.19.0/docs/resources/database) | resource |
| [postgresql_extension.pg_trgm](https://registry.terraform.io/providers/cyrilgdn/postgresql/1.19.0/docs/resources/extension) | resource |
| [postgresql_extension.uuid_ossp](https://registry.terraform.io/providers/cyrilgdn/postgresql/1.19.0/docs/resources/extension) | resource |
| [postgresql_role.db_roles](https://registry.terraform.io/providers/cyrilgdn/postgresql/1.19.0/docs/resources/role) | resource |
| [random_password.db_passwords](https://registry.terraform.io/providers/hashicorp/random/3.4.3/docs/resources/password) | resource |
| [postgresql_database.this](https://registry.terraform.io/providers/cyrilgdn/postgresql/latest/docs/resources/database) | resource |
| [postgresql_extension.pg_trgm](https://registry.terraform.io/providers/cyrilgdn/postgresql/latest/docs/resources/extension) | resource |
| [postgresql_extension.uuid_ossp](https://registry.terraform.io/providers/cyrilgdn/postgresql/latest/docs/resources/extension) | resource |
| [postgresql_role.owner](https://registry.terraform.io/providers/cyrilgdn/postgresql/latest/docs/resources/role) | resource |
| [random_password.owner](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password) | resource |
## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_database_private_hostname"></a> [database\_private\_hostname](#input\_database\_private\_hostname) | n/a | `string` | n/a | yes |
| <a name="input_databases"></a> [databases](#input\_databases) | n/a | `list(string)` | `[]` | no |
| <a name="input_database_name"></a> [database\_name](#input\_database\_name) | n/a | `string` | n/a | yes |
| <a name="input_owner_username"></a> [owner\_username](#input\_owner\_username) | n/a | `string` | `null` | no |
## Outputs

| Name | Description |
|------|-------------|
| <a name="output_connection_urls"></a> [connection\_urls](#output\_connection\_urls) | n/a |
| <a name="output_database_owners"></a> [database\_owners](#output\_database\_owners) | n/a |
| <a name="output_databases"></a> [databases](#output\_databases) | n/a |
| <a name="output_passwords"></a> [passwords](#output\_passwords) | n/a |
| <a name="output_database_name"></a> [database\_name](#output\_database\_name) | n/a |
| <a name="output_password"></a> [password](#output\_password) | n/a |
| <a name="output_username"></a> [username](#output\_username) | n/a |
<!-- END_AUTOMATED_TF_DOCS_BLOCK -->
36 changes: 16 additions & 20 deletions modules/user/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,39 @@

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0, < 2.0.0 |
| <a name="requirement_postgresql"></a> [postgresql](#requirement\_postgresql) | 1.19.0 |
| <a name="requirement_random"></a> [random](#requirement\_random) | 3.4.3 |
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.0, < 2.0.0 |
| <a name="requirement_postgresql"></a> [postgresql](#requirement\_postgresql) | ~> 1.21 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.6.0 |

Basic usage of this module is as follows:

```hcl
module "example" {
source = "<module-path>"
source = "<module-path>"
# Required variables
access_map =
access_user =
db_name =
db_owner =
roles =
username =
}
```

## Resources

| Name | Type |
|------|------|
| [postgresql_default_privileges.sequences](https://registry.terraform.io/providers/cyrilgdn/postgresql/1.19.0/docs/resources/default_privileges) | resource |
| [postgresql_default_privileges.tables](https://registry.terraform.io/providers/cyrilgdn/postgresql/1.19.0/docs/resources/default_privileges) | resource |
| [postgresql_grant.database](https://registry.terraform.io/providers/cyrilgdn/postgresql/1.19.0/docs/resources/grant) | resource |
| [postgresql_grant.schema](https://registry.terraform.io/providers/cyrilgdn/postgresql/1.19.0/docs/resources/grant) | resource |
| [postgresql_grant.sequence](https://registry.terraform.io/providers/cyrilgdn/postgresql/1.19.0/docs/resources/grant) | resource |
| [postgresql_grant.tables](https://registry.terraform.io/providers/cyrilgdn/postgresql/1.19.0/docs/resources/grant) | resource |
| [postgresql_grant_role.roles](https://registry.terraform.io/providers/cyrilgdn/postgresql/latest/docs/resources/grant_role) | resource |
| [postgresql_role.this](https://registry.terraform.io/providers/cyrilgdn/postgresql/latest/docs/resources/role) | resource |
| [random_password.this](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password) | resource |
## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_access_map"></a> [access\_map](#input\_access\_map) | n/a | <pre>object({<br> table_rights = list(string)<br> sequence_rights = list(string)<br> schema_rights = list(string)<br> database_rights = list(string)<br> }<br> )</pre> | n/a | yes |
| <a name="input_access_user"></a> [access\_user](#input\_access\_user) | grantee user | `string` | n/a | yes |
| <a name="input_db_name"></a> [db\_name](#input\_db\_name) | database name | `string` | n/a | yes |
| <a name="input_db_owner"></a> [db\_owner](#input\_db\_owner) | database owner | `string` | n/a | yes |
| <a name="input_roles"></a> [roles](#input\_roles) | user roles | `list(string)` | n/a | yes |
| <a name="input_username"></a> [username](#input\_username) | user name | `string` | n/a | yes |
## Outputs

No outputs.
| Name | Description |
|------|-------------|
| <a name="output_password"></a> [password](#output\_password) | n/a |
| <a name="output_username"></a> [username](#output\_username) | n/a |
<!-- END_AUTOMATED_TF_DOCS_BLOCK -->

0 comments on commit e3c9897

Please sign in to comment.