{"id":20757642,"url":"https://github.com/dodevops/terraform-azure-postgresql","last_synced_at":"2025-06-12T07:32:28.189Z","repository":{"id":39861151,"uuid":"371696773","full_name":"dodevops/terraform-azure-postgresql","owner":"dodevops","description":"Highly opinionated management of Azure DB for PostgreSQL","archived":false,"fork":false,"pushed_at":"2024-02-02T10:14:16.000Z","size":18,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-30T12:22:23.452Z","etag":null,"topics":["azure-db","postgresql","terraform-module"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/modules/dodevops/postgresql/azure/latest","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dodevops.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}},"created_at":"2021-05-28T12:40:50.000Z","updated_at":"2024-07-22T00:12:02.000Z","dependencies_parsed_at":"2023-12-28T11:44:26.753Z","dependency_job_id":null,"html_url":"https://github.com/dodevops/terraform-azure-postgresql","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodevops%2Fterraform-azure-postgresql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodevops%2Fterraform-azure-postgresql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodevops%2Fterraform-azure-postgresql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodevops%2Fterraform-azure-postgresql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dodevops","download_url":"https://codeload.github.com/dodevops/terraform-azure-postgresql/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251599465,"owners_count":21615525,"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":["azure-db","postgresql","terraform-module"],"created_at":"2024-11-17T09:43:29.108Z","updated_at":"2025-04-29T23:29:53.498Z","avatar_url":"https://github.com/dodevops.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azure DB for PostgreSQL\n\n## Introduction\n\nThis module manages resources for Azure DB for PostgreSQL.\n\n## Usage\n\nInstantiate the module by calling it from Terraform like this:\n\n```hcl\nmodule \"azure-postgresql\" {\n  source  = \"dodevops/postgresql/azure\"\n  version = \"\u003cversion\u003e\"\n}\n```\n\n\u003c!-- BEGIN_TF_DOCS --\u003e\n## Requirements\n\nThe following requirements are needed by this module:\n\n- terraform (\u003e=1.0.0)\n\n- azurerm (\u003e=3.63.0)\n\n## Providers\n\nThe following providers are used by this module:\n\n- azurerm (\u003e=3.63.0)\n\n## Modules\n\nNo modules.\n\n## Resources\n\nThe following resources are used by this module:\n\n- [azurerm_postgresql_configuration.connection-throttling-normal](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_configuration) (resource)\n- [azurerm_postgresql_configuration.log-checkpoints-normal](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_configuration) (resource)\n- [azurerm_postgresql_configuration.log-connections-normal](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_configuration) (resource)\n- [azurerm_postgresql_configuration.params](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_configuration) (resource)\n- [azurerm_postgresql_database.db](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_database) (resource)\n- [azurerm_postgresql_firewall_rule.firewall](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_firewall_rule) (resource)\n- [azurerm_postgresql_flexible_server.server](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_flexible_server) (resource)\n- [azurerm_postgresql_flexible_server_configuration.log-checkpoints](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_flexible_server_configuration) (resource)\n- [azurerm_postgresql_flexible_server_configuration.params](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_flexible_server_configuration) (resource)\n- [azurerm_postgresql_flexible_server_configuration.pgbouncer](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_flexible_server_configuration) (resource)\n- [azurerm_postgresql_flexible_server_database.db](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_flexible_server_database) (resource)\n- [azurerm_postgresql_flexible_server_firewall_rule.firewall](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_flexible_server_firewall_rule) (resource)\n- [azurerm_postgresql_server.server](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_server) (resource)\n- [azurerm_postgresql_virtual_network_rule.virtualnetworks](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_virtual_network_rule) (resource)\n- [azurerm_private_endpoint.postgresql-private-endpoint](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/private_endpoint) (resource)\n\n## Required Inputs\n\nThe following input variables are required:\n\n### admin\\_password\n\nDescription: Admin password\n\nType: `string`\n\n### charset\n\nDescription: Charset for the databases, which needs to be a\n[valid PostgreSQL charset](https://www.postgresql.org/docs/current/multibyte.html).\n\nType: `string`\n\n### collation\n\nDescription: Collation for the databases, which needs to be a\n[valid PostgreSQL collation](https://www.postgresql.org/docs/current/collation.html).\n*For single server* Microsoft uses different notation - f.e. en-US instead of en\\_US\n\nType: `string`\n\n### database\\_suffixes\n\nDescription: List of suffixes for databases to be created\n\nType: `list(string)`\n\n### location\n\nDescription: The azure location used for azure\n\nType: `string`\n\n### project\n\nDescription: Three letter project key\n\nType: `string`\n\n### resource\\_group\n\nDescription: Azure Resource Group to use\n\nType: `string`\n\n### stage\n\nDescription: Stage for this ressource group\n\nType: `string`\n\n## Optional Inputs\n\nThe following input variables are optional (have default values):\n\n### admin\\_login\n\nDescription: Admin login\n\nType: `string`\n\nDefault: `\"psql\"`\n\n### allowed\\_ips\n\nDescription: A hash of permissions to access the database server by ip. The hash key is the name suffix and each value  \nhas a start and an end value.\n\n* For public access set start to 0.0.0.0 and end to 255.255.255.255.\n* For access from all Azure services set start and end to 0.0.0.0\n\nThis variable is not used if public\\_access = false.\n\nType:\n\n```hcl\nmap(object({\n    start = string,\n    end   = string\n  }))\n```\n\nDefault: `{}`\n\n### autogrow\n\nDescription: Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage  \nand becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the  \nworkload (only single server)\n\nType: `bool`\n\nDefault: `true`\n\n### availability\\_zone\n\nDescription: The availability zone the Flexible Server should be placed in (only flexible server)\n\nType: `number`\n\nDefault: `1`\n\n### backup\\_retention\\_days\n\nDescription: Number of days to keep backups\n\nType: `number`\n\nDefault: `7`\n\n### database\\_flexible\n\nDescription: Whether to use Azure's flexible database service\n\nType: `bool`\n\nDefault: `false`\n\n### database\\_host\\_sku\n\nDescription: SKU for the database server to use. Single server uses values like GP\\_Gen5\\_2, flexible server uses Azure  \nmachine SKUs with a tier prefix like GP\\_Standard\\_D2s\\_v38. See the\n[Microsoft documentation](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-compute-storage)  \non what machine types are available for PostgreSQL.\n\nType: `string`\n\nDefault: `\"GP_Gen5_2\"`\n\n### database\\_storage\n\nDescription: Required database storage (in MB) (flexible server has a defined set of storage sizes to select from.  \nSee https://docs.microsoft.com/de-de/azure/postgresql/flexible-server/concepts-compute-storage#storage\n\nType: `string`\n\nDefault: `\"5120\"`\n\n### database\\_version\n\nDescription: Database version to use\n\nType: `string`\n\nDefault: `\"11\"`\n\n### geo\\_redundant\\_backup\\_enabled\n\nDescription: Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant  \nbackup storage in the General Purpose and Memory Optimized tiers. This is not supported for the Basic tier\n(only single server)\n\nType: `bool`\n\nDefault: `false`\n\n### params\n\nDescription: A map of server parameters to set\n\nType: `map(string)`\n\nDefault: `{}`\n\n### public\\_access\n\nDescription: Wether to allow public access to the database server. True will create firewall rules for allowed\\_ips and for  \nsubnets. False will create a private endpoint in each given subnet (allowed\\_ips will not be used then) - you have  \nto set `enforce_private_link_endpoint_network_policies = true` on your subnet in this case (see  \nthe [Terraform subnet resource documentation](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/subnet#enforce_private_link_endpoint_network_policies)).\n(false currently not supported for flexible server)\n\nType: `bool`\n\nDefault: `false`\n\n### subnets\n\nDescription: Maps of prefix =\u003e subnet id that has access to the server  (only single server)\n\nType: `map(string)`\n\nDefault: `{}`\n\n### suffix\n\nDescription: Naming suffix to allow multiple instances of this module\n\nType: `string`\n\nDefault: `\"\"`\n\n## Outputs\n\nThe following outputs are exported:\n\n### admin\\_login\n\nDescription: The administrative username\n\n### admin\\_password\n\nDescription: The password of the administrative user\n\n### database\\_ids\n\nDescription: IDs of the created databases\n\n### databases\n\nDescription: Names of the created databases\n\n### server\\_fqdn\n\nDescription: FQDN of the database service\n\n### server\\_id\n\nDescription: ID of the database server\n\u003c!-- END_TF_DOCS --\u003e\n\n## Development\n\nUse [the terraform module tools](https://github.com/dodevops/terraform-module-tools) to check and generate the documentation by running\n\n    docker run -v \"$PWD\":/terraform ghcr.io/dodevops/terraform-module-tools:latest\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdodevops%2Fterraform-azure-postgresql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdodevops%2Fterraform-azure-postgresql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdodevops%2Fterraform-azure-postgresql/lists"}