{"id":14957936,"url":"https://github.com/pellepelster/terraform-hcloud-solidblocks-rds-postgresql","last_synced_at":"2025-10-24T12:31:16.809Z","repository":{"id":164123254,"uuid":"639598782","full_name":"pellepelster/terraform-hcloud-solidblocks-rds-postgresql","owner":"pellepelster","description":"A containerized PostgreSQL database with all batteries included backup solution powered by pgBackRest","archived":false,"fork":false,"pushed_at":"2024-08-28T19:41:12.000Z","size":82,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-08T09:45:38.731Z","etag":null,"topics":["hetzner","hetzner-cloud","terraform","terraform-modules"],"latest_commit_sha":null,"homepage":"https://pellepelster.github.io/solidblocks/","language":"HCL","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pellepelster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-05-11T19:55:51.000Z","updated_at":"2024-09-23T12:13:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"b2bdb667-5dcc-4e95-8e52-e3e7d10986e9","html_url":"https://github.com/pellepelster/terraform-hcloud-solidblocks-rds-postgresql","commit_stats":{"total_commits":19,"total_committers":1,"mean_commits":19.0,"dds":0.0,"last_synced_commit":"22b41e3b4f2ec2f65e4ee514022406cbdd41ebc1"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pellepelster%2Fterraform-hcloud-solidblocks-rds-postgresql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pellepelster%2Fterraform-hcloud-solidblocks-rds-postgresql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pellepelster%2Fterraform-hcloud-solidblocks-rds-postgresql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pellepelster%2Fterraform-hcloud-solidblocks-rds-postgresql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pellepelster","download_url":"https://codeload.github.com/pellepelster/terraform-hcloud-solidblocks-rds-postgresql/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237964621,"owners_count":19394428,"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":["hetzner","hetzner-cloud","terraform","terraform-modules"],"created_at":"2024-09-24T13:15:51.218Z","updated_at":"2025-10-24T12:31:16.264Z","avatar_url":"https://github.com/pellepelster.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RDS PostgreSQL\n\nSee [documentation](https://pellepelster.github.io/solidblocks/hetzner/rds/) for more details and usage examples.\n\n\u003c!-- BEGIN_TF_DOCS --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_hcloud\"\u003e\u003c/a\u003e [hcloud](#requirement\\_hcloud) | \u003e=1.48.0 |\n| \u003ca name=\"requirement_http\"\u003e\u003c/a\u003e [http](#requirement\\_http) | \u003e= 3.3.0 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_hcloud\"\u003e\u003c/a\u003e [hcloud](#provider\\_hcloud) | \u003e=1.48.0 |\n| \u003ca name=\"provider_http\"\u003e\u003c/a\u003e [http](#provider\\_http) | \u003e= 3.3.0 |\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [hcloud_server.rds](https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs/resources/server) | resource |\n| [hcloud_volume_attachment.backup](https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs/resources/volume_attachment) | resource |\n| [hcloud_volume_attachment.data](https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs/resources/volume_attachment) | resource |\n| [hcloud_volume.backup](https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs/data-sources/volume) | data source |\n| [hcloud_volume.data](https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs/data-sources/volume) | data source |\n| [http_http.cloud_init_bootstrap_solidblocks](https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http) | data source |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_backup_encryption_passphrase\"\u003e\u003c/a\u003e [backup\\_encryption\\_passphrase](#input\\_backup\\_encryption\\_passphrase) | If set the backups will be encrypted using this passphrase | `string` | `null` | no |\n| \u003ca name=\"input_backup_full_calendar\"\u003e\u003c/a\u003e [backup\\_full\\_calendar](#input\\_backup\\_full\\_calendar) | systemd timer spec for full backups | `string` | `\"*-*-* 20:00:00\"` | no |\n| \u003ca name=\"input_backup_incr_calendar\"\u003e\u003c/a\u003e [backup\\_incr\\_calendar](#input\\_backup\\_incr\\_calendar) | systemd timer spec for incremental backups | `string` | `\"*-*-* *:00:55\"` | no |\n| \u003ca name=\"input_backup_local_retention_diff\"\u003e\u003c/a\u003e [backup\\_local\\_retention\\_diff](#input\\_backup\\_local\\_retention\\_diff) | Local backup number of differential backups to retain. See https://pgbackrest.org/configuration.html#section-repository/option-repo-retention-diff | `number` | `4` | no |\n| \u003ca name=\"input_backup_local_retention_full\"\u003e\u003c/a\u003e [backup\\_local\\_retention\\_full](#input\\_backup\\_local\\_retention\\_full) | Local backups full backup retention count/time. See https://pgbackrest.org/configuration.html#section-repository/option-repo-retention-full | `number` | `7` | no |\n| \u003ca name=\"input_backup_local_retention_full_type\"\u003e\u003c/a\u003e [backup\\_local\\_retention\\_full\\_type](#input\\_backup\\_local\\_retention\\_full\\_type) | Local backups retention policy type [count, time]. See https://pgbackrest.org/configuration.html#section-repository/option-repo-retention-full | `string` | `\"count\"` | no |\n| \u003ca name=\"input_backup_s3_access_key\"\u003e\u003c/a\u003e [backup\\_s3\\_access\\_key](#input\\_backup\\_s3\\_access\\_key) | AWS access key for S3 backups. To enable S3 backups `backup_s3_bucket`, `backup_s3_access_key` and `backup_s3_secret_key` have to be provided. | `string` | `null` | no |\n| \u003ca name=\"input_backup_s3_bucket\"\u003e\u003c/a\u003e [backup\\_s3\\_bucket](#input\\_backup\\_s3\\_bucket) | AWS bucket name for S3 backups. To enable S3 backups `backup_s3_bucket`, `backup_s3_access_key` and `backup_s3_secret_key` have to be provided. | `string` | `null` | no |\n| \u003ca name=\"input_backup_s3_host\"\u003e\u003c/a\u003e [backup\\_s3\\_host](#input\\_backup\\_s3\\_host) | AWS host S3 backups. | `string` | `\"s3.eu-central-1.amazonaws.com\"` | no |\n| \u003ca name=\"input_backup_s3_region\"\u003e\u003c/a\u003e [backup\\_s3\\_region](#input\\_backup\\_s3\\_region) | AWS region for S3 backups. | `string` | `\"eu-central-1\"` | no |\n| \u003ca name=\"input_backup_s3_retention_diff\"\u003e\u003c/a\u003e [backup\\_s3\\_retention\\_diff](#input\\_backup\\_s3\\_retention\\_diff) | AWS S3 backup number of differential backups to retain. See https://pgbackrest.org/configuration.html#section-repository/option-repo-retention-diff | `number` | `4` | no |\n| \u003ca name=\"input_backup_s3_retention_full\"\u003e\u003c/a\u003e [backup\\_s3\\_retention\\_full](#input\\_backup\\_s3\\_retention\\_full) | AWS S3 backups full backup retention count/time. See https://pgbackrest.org/configuration.html#section-repository/option-repo-retention-full | `number` | `7` | no |\n| \u003ca name=\"input_backup_s3_retention_full_type\"\u003e\u003c/a\u003e [backup\\_s3\\_retention\\_full\\_type](#input\\_backup\\_s3\\_retention\\_full\\_type) | AWS S3 backups retention policy type [count, time]. See https://pgbackrest.org/configuration.html#section-repository/option-repo-retention-full | `string` | `\"count\"` | no |\n| \u003ca name=\"input_backup_s3_secret_key\"\u003e\u003c/a\u003e [backup\\_s3\\_secret\\_key](#input\\_backup\\_s3\\_secret\\_key) | AWS secret key for S3 backups. To enable S3 backups `backup_s3_bucket` `backup_s3_access_key` and `backup_s3_secret_key` have to be provided. | `string` | `null` | no |\n| \u003ca name=\"input_backup_volume\"\u003e\u003c/a\u003e [backup\\_volume](#input\\_backup\\_volume) | backup volume id | `string` | `0` | no |\n| \u003ca name=\"input_data_volume\"\u003e\u003c/a\u003e [data\\_volume](#input\\_data\\_volume) | data volume id | `number` | n/a | yes |\n| \u003ca name=\"input_databases\"\u003e\u003c/a\u003e [databases](#input\\_databases) | A list of databases to create when the instance is initialized, for example: `{ id : \"database1\", user : \"user1\", password : \"password1\" }`. Changing `user` and `password` is supported at any time, the provided config is translated into an config for the Solidblocks RDS PostgreSQL module (https://pellepelster.github.io/solidblocks/rds/index.html), please see https://pellepelster.github.io/solidblocks/rds/index.html#databases for more details of the database configuration. | `list(object({ id : string, user : string, password : string }))` | n/a | yes |\n| \u003ca name=\"input_db_admin_password\"\u003e\u003c/a\u003e [db\\_admin\\_password](#input\\_db\\_admin\\_password) | The database admin password. Username is always rds | `string` | `\"\"` | no |\n| \u003ca name=\"input_db_backup_gcs_bucket\"\u003e\u003c/a\u003e [db\\_backup\\_gcs\\_bucket](#input\\_db\\_backup\\_gcs\\_bucket) | Name of the Google Cloud storage bucket | `string` | `null` | no |\n| \u003ca name=\"input_db_backup_gcs_service_key\"\u003e\u003c/a\u003e [db\\_backup\\_gcs\\_service\\_key](#input\\_db\\_backup\\_gcs\\_service\\_key) | content of the service key json file with appropriate permissions to write to the `db_backup_gcs_bucket` bucket. | `string` | `null` | no |\n| \u003ca name=\"input_environment_variables\"\u003e\u003c/a\u003e [environment\\_variables](#input\\_environment\\_variables) | A list environment variables to pass to the PostgreSQL  docker container | `map(string)` | `{}` | no |\n| \u003ca name=\"input_extra_user_data\"\u003e\u003c/a\u003e [extra\\_user\\_data](#input\\_extra\\_user\\_data) | deprecated, please use pre\\_script/post\\_script | `string` | `\"\"` | no |\n| \u003ca name=\"input_firewall_disable\"\u003e\u003c/a\u003e [firewall\\_disable](#input\\_firewall\\_disable) | disable automatic firewall configuration | `bool` | `false` | no |\n| \u003ca name=\"input_labels\"\u003e\u003c/a\u003e [labels](#input\\_labels) | A list of labels to be attached to the server instance. | `map(any)` | `{}` | no |\n| \u003ca name=\"input_location\"\u003e\u003c/a\u003e [location](#input\\_location) | Hetzner location to use for provisioned resources | `string` | n/a | yes |\n| \u003ca name=\"input_mode\"\u003e\u003c/a\u003e [mode](#input\\_mode) | startup mode for the database, can be empty to start the database or 'maintenance' to enable the maintenance mode of the underlying docker container to debug issues see also https://pellepelster.github.io/solidblocks//rds/#maintenance | `string` | `null` | no |\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input\\_name) | Unique name for the PostgreSQL instance | `string` | n/a | yes |\n| \u003ca name=\"input_network_id\"\u003e\u003c/a\u003e [network\\_id](#input\\_network\\_id) | network the created sever should be attached to, network\\_ip also needs to bet set in that case | `number` | `null` | no |\n| \u003ca name=\"input_network_ip\"\u003e\u003c/a\u003e [network\\_ip](#input\\_network\\_ip) | ip address in the attached network. when an ip address is provided the database server will automatically be bound to this ip and will not be exposed on any other network interfaces | `string` | `null` | no |\n| \u003ca name=\"input_post_script\"\u003e\u003c/a\u003e [post\\_script](#input\\_post\\_script) | shell script that will be executed after the server configuration is executed | `string` | `\"\"` | no |\n| \u003ca name=\"input_postgres_extra_config\"\u003e\u003c/a\u003e [postgres\\_extra\\_config](#input\\_postgres\\_extra\\_config) | Extra postgres configurations options for the postgresql.conf, see also https://pellepelster.github.io/solidblocks/rds/index.html#global -\u003e DB\\_POSTGRES\\_EXTRA\\_CONFIG | `string` | `null` | no |\n| \u003ca name=\"input_postgres_major_version\"\u003e\u003c/a\u003e [postgres\\_major\\_version](#input\\_postgres\\_major\\_version) | PostgreSQL major version to use. Upgrading the version will trigger auto migration based on the underlying RDS PostgreSQL docker image, see also https://pellepelster.github.io/solidblocks/rds/index.html#versions. Please be aware that depending on the amount of data to migrate the migration may Terraforms timeouts, see https://pellepelster.github.io/solidblocks/hetzner/rds-postgresql/index.html#operations for debugging options. | `number` | `14` | no |\n| \u003ca name=\"input_postgres_stop_timeout\"\u003e\u003c/a\u003e [postgres\\_stop\\_timeout](#input\\_postgres\\_stop\\_timeout) | shutdown timeout for the postgres database in seconds, see also https://www.postgresql.org/docs/current/app-pg-ctl.html | `number` | `60` | no |\n| \u003ca name=\"input_pre_script\"\u003e\u003c/a\u003e [pre\\_script](#input\\_pre\\_script) | shell script that will be executed before the server configuration is executed | `string` | `\"\"` | no |\n| \u003ca name=\"input_public_net_ipv4_enabled\"\u003e\u003c/a\u003e [public\\_net\\_ipv4\\_enabled](#input\\_public\\_net\\_ipv4\\_enabled) | enable/disable public ip addresses, see also https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs/resources/server#public_net | `bool` | `true` | no |\n| \u003ca name=\"input_public_net_ipv6_enabled\"\u003e\u003c/a\u003e [public\\_net\\_ipv6\\_enabled](#input\\_public\\_net\\_ipv6\\_enabled) | enable/disable public ip addresses, see also https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs/resources/server#public_net | `bool` | `true` | no |\n| \u003ca name=\"input_restore_pitr\"\u003e\u003c/a\u003e [restore\\_pitr](#input\\_restore\\_pitr) | Point in time to recover to, using the recovery type `time` as defined in https://pgbackrest.org/command.html#command-restore. Format should be `YYYY-MM-dd HH:mm:ssz` Please be aware that the server hosting the database might be in a different timezone, so always include the timezone when specifying PITR times `date +\"%Y-%m-%d %H:%M:%S%z\"` | `string` | `null` | no |\n| \u003ca name=\"input_server_type\"\u003e\u003c/a\u003e [server\\_type](#input\\_server\\_type) | Hetzner cloud server type, supports x86 and ARM architectures | `string` | `\"cx11\"` | no |\n| \u003ca name=\"input_solidblocks_base_url\"\u003e\u003c/a\u003e [solidblocks\\_base\\_url](#input\\_solidblocks\\_base\\_url) | override base url for testing purposes | `string` | `\"https://github.com\"` | no |\n| \u003ca name=\"input_solidblocks_cloud_init_version\"\u003e\u003c/a\u003e [solidblocks\\_cloud\\_init\\_version](#input\\_solidblocks\\_cloud\\_init\\_version) | Solidblocks cloud-init version to use | `string` | `\"v0.2.7\"` | no |\n| \u003ca name=\"input_solidblocks_rds_version\"\u003e\u003c/a\u003e [solidblocks\\_rds\\_version](#input\\_solidblocks\\_rds\\_version) | Solidblocks rds-postgresql version to use | `string` | `\"v0.2.7\"` | no |\n| \u003ca name=\"input_ssh_keys\"\u003e\u003c/a\u003e [ssh\\_keys](#input\\_ssh\\_keys) | ssh keys to provision for instance access | `list(number)` | n/a | yes |\n| \u003ca name=\"input_ssl_acme_server\"\u003e\u003c/a\u003e [ssl\\_acme\\_server](#input\\_ssl\\_acme\\_server) | The URL of the ACME Server to use. Defaults to Let's Encrypt production environment. | `string` | `\"https://acme-v02.api.letsencrypt.org/directory\"` | no |\n| \u003ca name=\"input_ssl_dns_provider\"\u003e\u003c/a\u003e [ssl\\_dns\\_provider](#input\\_ssl\\_dns\\_provider) | provider type to use for LetsEncrypt DNS challenge, see https://go-acme.github.io/lego/dns/ for available options | `string` | `\"\"` | no |\n| \u003ca name=\"input_ssl_dns_provider_config\"\u003e\u003c/a\u003e [ssl\\_dns\\_provider\\_config](#input\\_ssl\\_dns\\_provider\\_config) | environment configuration variable(s) to use for DNS provider selected via `ssl_dns_provider`, see documentation of selected provider for required configuration variables | `map(string)` | `{}` | no |\n| \u003ca name=\"input_ssl_domains\"\u003e\u003c/a\u003e [ssl\\_domains](#input\\_ssl\\_domains) | domains to use for generated certificates | `list(string)` | `[]` | no |\n| \u003ca name=\"input_ssl_email\"\u003e\u003c/a\u003e [ssl\\_email](#input\\_ssl\\_email) | email address to use for LetsEncrypt account creation | `string` | `\"\"` | no |\n| \u003ca name=\"input_ssl_enable\"\u003e\u003c/a\u003e [ssl\\_enable](#input\\_ssl\\_enable) | enable automatic ssl certificate creation using LetsEncrypt | `bool` | `false` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_ipv4_address\"\u003e\u003c/a\u003e [ipv4\\_address](#output\\_ipv4\\_address) | IPv4 address of the created server if applicable |\n| \u003ca name=\"output_ipv4_address_private\"\u003e\u003c/a\u003e [ipv4\\_address\\_private](#output\\_ipv4\\_address\\_private) | private IPv4 address of the created server if applicable |\n| \u003ca name=\"output_ipv6_address\"\u003e\u003c/a\u003e [ipv6\\_address](#output\\_ipv6\\_address) | IPv6 address of the created server if applicable |\n| \u003ca name=\"output_this_server_id\"\u003e\u003c/a\u003e [this\\_server\\_id](#output\\_this\\_server\\_id) | Hetzner ID of the created server |\n| \u003ca name=\"output_user_data\"\u003e\u003c/a\u003e [user\\_data](#output\\_user\\_data) | n/a |\n\u003c!-- END_TF_DOCS --\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpellepelster%2Fterraform-hcloud-solidblocks-rds-postgresql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpellepelster%2Fterraform-hcloud-solidblocks-rds-postgresql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpellepelster%2Fterraform-hcloud-solidblocks-rds-postgresql/lists"}