postgresql
Azure/postgresql/azurerm
Azure Database for PostgreSQL Module
Create an Azure PostgreSQL Database This Terraform module creates a Azure PostgreSQL Database. Usage in Terraform 0.13 ``hcl provider "azurerm" { features {} } resource "azurerm_resource_group" "example" { name = "examples-rg" location = "West Europe" } module "postgresql" { source = "Azure/postgresql/azurerm" resource_group_name = azurerm_resource_group.example.name location = azurerm_resource_group.example.location server_name = "examples-server" sku_name = "GP_Gen5_2" storage_mb = 5120 auto_grow_enabled = false backup_retention_days = 7 geo_redundant_backup_enabled = false administrator_login = "login" administrator_password = "password" server_version = "9.5" ssl_enforcement_enabled = true public_network_access_enabled = true db_names = ["my_db1", "my_db2"] db_charset = "UTF8" db_colla
| Name | Type | Description | Default |
|---|---|---|---|
| administrator_login | string | The Administrator Login for the PostgreSQL Server. Changing this forces a new re | required |
| resource_group_name | string | The name of the resource group in which to create the PostgreSQL Server. Changin | required |
| server_name | string | Specifies the name of the PostgreSQL Server. Changing this forces a new resource | required |
| administrator_password | string | The Password associated with the administrator_login for the PostgreSQL Server. | required |
| location | string | Specifies the supported Azure location where the resource exists. Changing this | required |
| firewall_rule_prefix | string | Specifies prefix for firewall rule names. | "firewall-" |
| server_version | string | Specifies the version of PostgreSQL to use. Valid values are `9.5`, `9.6`, `10.0 | "9.5" |
| tracing_tags_prefix | string | Default prefix for generated tracing tags | "avm_" |
| vnet_rules | list(map(string)) | The list of maps, describing vnet rules. Valud map items: name, subnet_id. | [] |
| ssl_enforcement_enabled | bool | Specifies if SSL should be enforced on connections. Possible values are Enabled | true |
| creation_source_server_id | string | (Optional) For creation modes other than `Default`, the source server ID to use. | null |
| tracing_tags_enabled | bool | Whether enable tracing tags that generated by BridgeCrew Yor. | false |
| create_mode | string | (Optional) The creation mode. Can be used to restore or replicate existing serve | "Default" |
| db_charset | string | Specifies the Charset for the PostgreSQL Database, which needs to be a valid Pos | "UTF8" |
| firewall_rules | list(map(string)) | The list of maps, describing firewall rules. Valid map items: name, start_ip, en | [] |
| tags | map(string) | A map of tags to set on every taggable resources. Empty by default. | {} |
| backup_retention_days | number | Backup retention days for the server, supported values are between 7 and 35 days | 7 |
| db_collation | string | Specifies the Collation for the PostgreSQL Database, which needs to be a valid P | "English_United States.1252" |
| infrastructure_encryption_enabled | bool | Whether or not infrastructure is encrypted for this server | true |
| vnet_rule_name_prefix | string | Specifies prefix for vnet rule names. | "postgresql-vnet-rule-" |
| db_names | list(string) | The list of names of the PostgreSQL Database, which needs to be a valid PostgreS | [] |
| geo_redundant_backup_enabled | bool | Enable Geo-redundant or not for server backup. Valid values for this property ar | true |
| storage_mb | number | Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1 | 102400 |
| threat_detection_policy | object( { enabled | Threat detection policy configuration, known in the API as Server Security Alert | null |
| postgresql_configurations | map(string) | A map with PostgreSQL configurations to enable. | {} |
server_name — The name of the PostgreSQL servervnet_rule_ids — The list of all vnet rule resource idsadministrator_login — The Administrator login for the PostgreSQL Serveradministrator_password — The Password associated with the `administrator_login` for the PostgreSQL Serverdatabase_ids — The list of all database resource idsfirewall_rule_ids — The list of all firewall rule resource idsserver_fqdn — The fully qualified domain name (FQDN) of the PostgreSQL serverserver_id — The resource id of the PostgreSQL server