{"id":42923257,"url":"https://github.com/ansforge/terraform-module-postgres","last_synced_at":"2026-02-06T17:01:14.900Z","repository":{"id":335485897,"uuid":"1145211034","full_name":"ansforge/terraform-module-postgres","owner":"ansforge","description":"Scripts terraform de creation de modules postgresql","archived":false,"fork":false,"pushed_at":"2026-01-30T16:17:39.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-31T05:41:52.932Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ansforge.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-29T15:04:27.000Z","updated_at":"2026-01-30T16:17:34.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ansforge/terraform-module-postgres","commit_stats":null,"previous_names":["ansforge/terraform-module-postgres"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ansforge/terraform-module-postgres","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansforge%2Fterraform-module-postgres","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansforge%2Fterraform-module-postgres/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansforge%2Fterraform-module-postgres/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansforge%2Fterraform-module-postgres/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ansforge","download_url":"https://codeload.github.com/ansforge/terraform-module-postgres/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansforge%2Fterraform-module-postgres/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29169384,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T16:33:35.550Z","status":"ssl_error","status_checked_at":"2026-02-06T16:33:30.716Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-01-30T18:02:16.954Z","updated_at":"2026-02-06T17:01:14.895Z","avatar_url":"https://github.com/ansforge.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-module-postgres\n\nTerraform module to manage OVH PostgreSQL instance and resources.\n\n## Description\n\nThis module creates and configures an OVH Cloud PostgreSQL database instance with user management. It provisions:\n- A managed PostgreSQL database on OVH Cloud\n- An admin user with generated credentials\n\n## Prerequisites\n\n- Terraform \u003e= 1.0.0\n- OVH provider ~\u003e 2.8.0\n- OVH credentials configured (via environment variables or configuration file)\n- An existing OVH Cloud project with a private network\n\n## Required environment variables\n\n```bash\nexport OVH_ENDPOINT=ovh-eu\nexport OVH_APPLICATION_KEY=your_application_key\nexport OVH_APPLICATION_SECRET=your_application_secret\nexport OVH_CONSUMER_KEY=your_consumer_key\n```\n\n## Usage\n\n### Basic example\n\n```hcl\nmodule \"postgres\" {\n  source = \"git::https://github.com/ansforge/terraform-module-postgres.git?ref=ovh/v1.0.0\"\n\n  service_name     = \"my-instance-name\"\n  description      = \"Instance user for project-xxxx\"\n  region           = \"eu-west-rbx\"\n  plan             = \"essential\"\n  flavor           = \"db1-4\"\n  postgres_version = \"15\"\n  network_id       = \"your-network-id\"\n  subnet_id        = \"your-subnet-id\"\n  disk_size        = 20\n  node_count       = 1\n  admin_username   = \"admin\"\n}\n```\n\n### Production example\n\n```hcl\nmodule \"postgres\" {\n  source = \"git::https://github.com/ansforge/terraform-module-postgres.git//ovh?ref=v1.0.0\"\n\n  service_name        = \"your-ovh-project-id\"\n  description         = \"Production PostgreSQL database\"\n  region              = \"eu-west-rbx\"\n  plan                = \"business\"\n  flavor              = \"db1-15\"\n  postgres_version    = \"15\"\n  network_id          = \"your-network-id\"\n  subnet_id           = \"your-subnet-id\"\n  disk_size           = 100\n  node_count          = 3\n  admin_username      = \"prod_admin\"\n  deletion_protection = true\n}\n\noutput \"database_uri\" {\n  value     = module.postgres.database_uri\n  sensitive = true\n}\n\noutput \"admin_password\" {\n  value     = module.postgres.admin_password\n  sensitive = true\n}\n```\n\n## Variables\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| `service_name` | OVH Cloud project service name | `string` | n/a | yes |\n| `description` | Description of the PostgreSQL instance | `string` | n/a | yes |\n| `region` | OVH region for the PostgreSQL instance | `string` | `\"eu-west-rbx\"` | no |\n| `plan` | Plan for the PostgreSQL instance (essential, business, enterprise) | `string` | n/a | yes |\n| `flavor` | Flavor for the PostgreSQL instance (e.g., db1-4, db1-7, db1-15) | `string` | n/a | yes |\n| `postgres_version` | PostgreSQL version | `string` | n/a | yes |\n| `network_id` | Network ID for the PostgreSQL instance | `string` | n/a | yes |\n| `subnet_id` | Subnet ID for the PostgreSQL instance | `string` | n/a | yes |\n| `disk_size` | Disk size in GB for the PostgreSQL instance | `number` | n/a | yes |\n| `node_count` | Number of nodes for the PostgreSQL instance | `number` | n/a | yes |\n| `admin_username` | Admin username for the PostgreSQL instance | `string` | n/a | yes |\n| `deletion_protection` | Whether to enable deletion protection for the PostgreSQL instance | `bool` | `true` | no |\n\n## Outputs\n\n| Name | Description | Sensitive |\n|------|-------------|:---------:|\n| `database_uri` | Connection URI for the PostgreSQL database | no |\n| `admin_username` | Admin username for the database | no |\n| `admin_password` | Admin password for the database | yes |\n\n## Connecting to the database\n\nOnce the database is created, you can connect using the generated credentials:\n\n```bash\n# Using psql\npsql \"$(terraform output -raw database_uri)\"\n\n# Or with explicit credentials\npsql -h \u003chost\u003e -p \u003cport\u003e -U \u003cadmin_username\u003e -d defaultdb\n```\n\n## License\n\nSee [LICENSE](LICENSE) in the parent repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fansforge%2Fterraform-module-postgres","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fansforge%2Fterraform-module-postgres","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fansforge%2Fterraform-module-postgres/lists"}