{"id":15867345,"url":"https://github.com/joatmon08/terraform-vault-postgres-nia","last_synced_at":"2026-01-11T01:47:29.294Z","repository":{"id":112737267,"uuid":"499596119","full_name":"joatmon08/terraform-vault-postgres-nia","owner":"joatmon08","description":"Consul-Terraform-Sync compatible module for synchronizing Consul service to Vault database secrets engine","archived":false,"fork":false,"pushed_at":"2022-06-07T12:53:48.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-07T14:15:01.994Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/modules/joatmon08/postgres-nia/vault","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joatmon08.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-03T17:29:13.000Z","updated_at":"2022-06-07T20:11:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"4535a190-917c-4dee-bdb3-4f32212c0fc4","html_url":"https://github.com/joatmon08/terraform-vault-postgres-nia","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joatmon08%2Fterraform-vault-postgres-nia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joatmon08%2Fterraform-vault-postgres-nia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joatmon08%2Fterraform-vault-postgres-nia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joatmon08%2Fterraform-vault-postgres-nia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joatmon08","download_url":"https://codeload.github.com/joatmon08/terraform-vault-postgres-nia/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246715994,"owners_count":20822392,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-06T00:00:26.686Z","updated_at":"2026-01-11T01:47:29.289Z","avatar_url":"https://github.com/joatmon08.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-vault-database-nia\n\nConsul-Terraform-Sync compatible module for synchronizing Consul service to the\n[PostgreSQL database secrets engine](https://www.vaultproject.io/docs/secrets/databases/postgresql)\nfor Vault.\n\n\u003e Note: This scopes the creation of a single database service to unique secrets engine path.\n\u003e Mapping the database service to its own secrets engine path ensures that you can scope\n\u003e Vault roles and authentication to the specific credential you need.\n\nThis module configures:\n\n- Database secrets engine backend\n- Database secrets engine connection\n- Database secrets engine role\n- (Optional) Kubernetes authentication method role\n\nYou can separately configure a different authentication method.\n\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_vault\"\u003e\u003c/a\u003e [vault](#requirement\\_vault) | \u003e= 3.6.0 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_vault\"\u003e\u003c/a\u003e [vault](#provider\\_vault) | 3.6.0 |\n\n## Modules\n\nNo modules.\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [vault_database_secret_backend_connection.postgres](https://registry.terraform.io/providers/hashicorp/vault/latest/docs/resources/database_secret_backend_connection) | resource |\n| [vault_database_secret_backend_role.postgres](https://registry.terraform.io/providers/hashicorp/vault/latest/docs/resources/database_secret_backend_role) | resource |\n| [vault_kubernetes_auth_backend_role.postgres](https://registry.terraform.io/providers/hashicorp/vault/latest/docs/resources/kubernetes_auth_backend_role) | resource |\n| [vault_mount.postgres](https://registry.terraform.io/providers/hashicorp/vault/latest/docs/resources/mount) | resource |\n| [vault_policy.postgres](https://registry.terraform.io/providers/hashicorp/vault/latest/docs/resources/policy) | resource |\n| [vault_policy_document.postgres](https://registry.terraform.io/providers/hashicorp/vault/latest/docs/data-sources/policy_document) | data source |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_additional_connection_string_arguments\"\u003e\u003c/a\u003e [additional\\_connection\\_string\\_arguments](#input\\_additional\\_connection\\_string\\_arguments) | Additional connection string arguments for database connection in Vault | `string` | `\"sslmode=disable\"` | no |\n| \u003ca name=\"input_allowed_roles\"\u003e\u003c/a\u003e [allowed\\_roles](#input\\_allowed\\_roles) | List of allowed roles for database connection in Vault | `list(string)` | \u003cpre\u003e[\u003cbr\u003e  \"*\"\u003cbr\u003e]\u003c/pre\u003e | no |\n| \u003ca name=\"input_bound_service_account_names\"\u003e\u003c/a\u003e [bound\\_service\\_account\\_names](#input\\_bound\\_service\\_account\\_names) | If set, set up Kubernetes auth method with specific service accounts. | `list(string)` | `[]` | no |\n| \u003ca name=\"input_bound_service_account_namespaces\"\u003e\u003c/a\u003e [bound\\_service\\_account\\_namespaces](#input\\_bound\\_service\\_account\\_namespaces) | If set, set up Kubernetes auth method with specific namespaces. | `list(string)` | `[]` | no |\n| \u003ca name=\"input_creation_statements\"\u003e\u003c/a\u003e [creation\\_statements](#input\\_creation\\_statements) | List of creation statements to create user in PostgreSQL | `list(string)` | \u003cpre\u003e[\u003cbr\u003e  \"CREATE ROLE \\\"{{name}}\\\" WITH LOGIN PASSWORD '{{password}}' VALID UNTIL '{{expiration}}'; GRANT SELECT ON ALL TABLES IN SCHEMA public TO \\\"{{name}}\\\";\"\u003cbr\u003e]\u003c/pre\u003e | no |\n| \u003ca name=\"input_database_path\"\u003e\u003c/a\u003e [database\\_path](#input\\_database\\_path) | Path to database secrets engine in Vault | `string` | `\"database\"` | no |\n| \u003ca name=\"input_default_ttl\"\u003e\u003c/a\u003e [default\\_ttl](#input\\_default\\_ttl) | Default TTL for database credentials | `number` | `3600` | no |\n| \u003ca name=\"input_max_ttl\"\u003e\u003c/a\u003e [max\\_ttl](#input\\_max\\_ttl) | Max TTL for database credentials | `number` | `3600` | no |\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input\\_name) | Name of database connection and role to configure in Vault | `string` | n/a | yes |\n| \u003ca name=\"input_postgres_database_name\"\u003e\u003c/a\u003e [postgres\\_database\\_name](#input\\_postgres\\_database\\_name) | Database to access for PostgreSQL | `string` | n/a | yes |\n| \u003ca name=\"input_postgres_password\"\u003e\u003c/a\u003e [postgres\\_password](#input\\_postgres\\_password) | Administrative password for PostgreSQL | `string` | n/a | yes |\n| \u003ca name=\"input_postgres_username\"\u003e\u003c/a\u003e [postgres\\_username](#input\\_postgres\\_username) | Administrative username for PostgreSQL | `string` | n/a | yes |\n| \u003ca name=\"input_revocation_statements\"\u003e\u003c/a\u003e [revocation\\_statements](#input\\_revocation\\_statements) | List of revocation statements to create user in PostgreSQL | `list(string)` | \u003cpre\u003e[\u003cbr\u003e  \"ALTER ROLE \\\"{{name}}\\\" NOLOGIN;\"\u003cbr\u003e]\u003c/pre\u003e | no |\n| \u003ca name=\"input_role_name\"\u003e\u003c/a\u003e [role\\_name](#input\\_role\\_name) | Name of role to configure in Vault if not the same as database connection. | `string` | `\"\"` | no |\n| \u003ca name=\"input_services\"\u003e\u003c/a\u003e [services](#input\\_services) | Consul services monitored by Consul-Terraform-Sync | \u003cpre\u003emap(\u003cbr\u003e    object({\u003cbr\u003e      id        = string\u003cbr\u003e      name      = string\u003cbr\u003e      kind      = string\u003cbr\u003e      address   = string\u003cbr\u003e      port      = number\u003cbr\u003e      meta      = map(string)\u003cbr\u003e      tags      = list(string)\u003cbr\u003e      namespace = string\u003cbr\u003e      status    = string\u003cbr\u003e\u003cbr\u003e      node                  = string\u003cbr\u003e      node_id               = string\u003cbr\u003e      node_address          = string\u003cbr\u003e      node_datacenter       = string\u003cbr\u003e      node_tagged_addresses = map(string)\u003cbr\u003e      node_meta             = map(string)\u003cbr\u003e\u003cbr\u003e      cts_user_defined_meta = map(string)\u003cbr\u003e    })\u003cbr\u003e  )\u003c/pre\u003e | n/a | yes |\n| \u003ca name=\"input_vault_kubernetes_auth_path\"\u003e\u003c/a\u003e [vault\\_kubernetes\\_auth\\_path](#input\\_vault\\_kubernetes\\_auth\\_path) | If set, set up Kubernetes auth method. | `string` | `\"\"` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_vault_mount_path\"\u003e\u003c/a\u003e [vault\\_mount\\_path](#output\\_vault\\_mount\\_path) | n/a |\n| \u003ca name=\"output_vault_policy\"\u003e\u003c/a\u003e [vault\\_policy](#output\\_vault\\_policy) | n/a |\n| \u003ca name=\"output_vault_role\"\u003e\u003c/a\u003e [vault\\_role](#output\\_vault\\_role) | n/a |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoatmon08%2Fterraform-vault-postgres-nia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoatmon08%2Fterraform-vault-postgres-nia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoatmon08%2Fterraform-vault-postgres-nia/lists"}