2022-12-08 04:41:13 +03:00
variable " administrator_login " {
2020-09-07 10:51:30 +03:00
type = string
2023-05-08 09:24:50 +03:00
description = " The Administrator Login for the PostgreSQL Server. Changing this forces a new resource to be created. "
2018-10-10 07:34:38 +03:00
}
2022-12-08 04:41:13 +03:00
variable " administrator_password " {
2023-05-08 09:24:50 +03:00
type = string
2022-12-08 04:41:13 +03:00
description = " The Password associated with the administrator_login for the PostgreSQL Server. "
2022-12-29 19:00:28 +03:00
sensitive = true
2018-10-10 07:34:38 +03:00
}
2022-12-08 04:41:13 +03:00
variable " location " {
2020-09-07 10:51:30 +03:00
type = string
2023-05-08 09:24:50 +03:00
description = " Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. "
2018-10-10 07:34:38 +03:00
}
2022-12-08 04:41:13 +03:00
variable " resource_group_name " {
2020-09-07 10:51:30 +03:00
type = string
2023-05-08 09:24:50 +03:00
description = " The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created. "
2018-10-10 07:34:38 +03:00
}
2022-12-08 04:41:13 +03:00
variable " server_name " {
type = string
2023-05-08 09:24:50 +03:00
description = " Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. "
2018-10-10 07:34:38 +03:00
}
2022-12-28 11:06:13 +03:00
variable " auto_grow_enabled " {
type = bool
default = true
2023-05-08 09:24:50 +03:00
description = " (Optional) Enable or disable incremental automatic growth of database space. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is `true`. "
2022-12-28 11:06:13 +03:00
}
2018-10-10 07:34:38 +03:00
variable " backup_retention_days " {
2020-09-07 10:51:30 +03:00
type = number
2018-10-10 07:34:38 +03:00
default = 7
2023-05-08 09:24:50 +03:00
description = " Backup retention days for the server, supported values are between 7 and 35 days. "
2018-10-10 07:34:38 +03:00
}
2023-01-11 09:11:02 +03:00
variable " create_mode " {
type = string
default = " Default "
2023-05-08 09:24:50 +03:00
description = " (Optional) The creation mode. Can be used to restore or replicate existing servers. Possible values are `Default`, `Replica`, `GeoRestore`, and `PointInTimeRestore`. Defaults to `Default.` "
2023-01-11 09:11:02 +03:00
nullable = false
}
variable " creation_source_server_id " {
type = string
default = null
2023-05-08 09:24:50 +03:00
description = " (Optional) For creation modes other than `Default`, the source server ID to use. "
2023-01-11 09:11:02 +03:00
}
2022-12-08 04:41:13 +03:00
variable " db_charset " {
type = string
default = " UTF8 "
2023-05-08 09:24:50 +03:00
description = " Specifies the Charset for the PostgreSQL Database, which needs to be a valid PostgreSQL Charset. Changing this forces a new resource to be created. "
2018-10-10 07:34:38 +03:00
}
2022-12-08 04:41:13 +03:00
variable " db_collation " {
2020-09-07 10:51:30 +03:00
type = string
2022-12-08 04:41:13 +03:00
default = " English_United States.1252 "
2023-05-08 09:24:50 +03:00
description = " Specifies the Collation for the PostgreSQL Database, which needs to be a valid PostgreSQL Collation. Note that Microsoft uses different notation - en-US instead of en_US. Changing this forces a new resource to be created. "
2018-10-10 07:34:38 +03:00
}
2022-12-08 04:41:13 +03:00
variable " db_names " {
type = list ( string )
default = [ ]
2023-05-08 09:24:50 +03:00
description = " The list of names of the PostgreSQL Database, which needs to be a valid PostgreSQL identifier. Changing this forces a new resource to be created. "
2018-10-10 07:34:38 +03:00
}
2022-12-08 04:41:13 +03:00
variable " firewall_rule_prefix " {
2020-09-07 10:51:30 +03:00
type = string
2022-12-08 04:41:13 +03:00
default = " firewall- "
2023-05-08 09:24:50 +03:00
description = " Specifies prefix for firewall rule names. "
2018-10-10 07:34:38 +03:00
}
2022-12-08 04:41:13 +03:00
variable " firewall_rules " {
type = list ( map ( string ) )
default = [ ]
2023-05-08 09:24:50 +03:00
description = " The list of maps, describing firewall rules. Valid map items: name, start_ip, end_ip. "
2022-12-08 04:41:13 +03:00
}
variable " geo_redundant_backup_enabled " {
2020-09-07 10:51:30 +03:00
type = bool
2020-07-17 05:24:56 +03:00
default = true
2023-05-08 09:24:50 +03:00
description = " Enable Geo-redundant or not for server backup. Valid values for this property are Enabled or Disabled, not supported for the basic tier. "
2018-10-10 07:34:38 +03:00
}
2022-12-08 04:41:13 +03:00
variable " infrastructure_encryption_enabled " {
2021-02-24 06:09:32 +03:00
type = bool
default = true
2023-05-08 09:24:50 +03:00
description = " Whether or not infrastructure is encrypted for this server "
2021-02-24 06:09:32 +03:00
}
2022-12-08 04:41:13 +03:00
variable " postgresql_configurations " {
type = map ( string )
default = { }
2023-05-08 09:24:50 +03:00
description = " A map with PostgreSQL configurations to enable. "
2018-10-10 07:34:38 +03:00
}
2022-12-08 04:41:13 +03:00
variable " public_network_access_enabled " {
type = bool
default = false
2023-05-08 09:24:50 +03:00
description = " Whether or not public network access is allowed for this server. Possible values are Enabled and Disabled. "
2018-10-10 07:34:38 +03:00
}
2022-12-08 04:41:13 +03:00
variable " server_version " {
2020-09-07 10:51:30 +03:00
type = string
2022-12-08 04:41:13 +03:00
default = " 9.5 "
2023-05-08 09:24:50 +03:00
description = " Specifies the version of PostgreSQL to use. Valid values are `9.5`, `9.6`, `10.0`, `10.2` and `11`. Changing this forces a new resource to be created. "
2018-10-10 07:34:38 +03:00
}
2022-12-08 04:41:13 +03:00
variable " sku_name " {
2020-09-07 10:51:30 +03:00
type = string
2022-12-08 04:41:13 +03:00
default = " GP_Gen5_4 "
2023-05-08 09:24:50 +03:00
description = " Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). "
2018-10-10 07:34:38 +03:00
}
2022-12-08 04:41:13 +03:00
variable " ssl_enforcement_enabled " {
type = bool
default = true
2023-05-08 09:24:50 +03:00
description = " Specifies if SSL should be enforced on connections. Possible values are Enabled and Disabled. "
2018-10-10 07:34:38 +03:00
}
2022-12-08 04:41:13 +03:00
variable " ssl_minimal_tls_version_enforced " {
2020-09-07 10:51:30 +03:00
type = string
2022-12-08 04:41:13 +03:00
default = " TLS1_2 "
2023-05-08 09:24:50 +03:00
description = " (Optional) The minimum TLS version to support on the sever. Possible values are `TLSEnforcementDisabled`, `TLS1_0`, `TLS1_1`, and `TLS1_2`. Defaults to `TLS1_2`. `ssl_minimal_tls_version_enforced` must be set to `TLSEnforcementDisabled` when `ssl_enforcement_enabled` is set to `false`. "
2018-10-10 07:34:38 +03:00
}
2022-12-08 04:41:13 +03:00
variable " storage_mb " {
type = number
default = 102400
2023-05-08 09:24:50 +03:00
description = " Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 4194304 MB(4TB) for General Purpose/Memory Optimized SKUs. "
2018-10-10 07:34:38 +03:00
}
2018-12-12 18:52:45 +03:00
variable " tags " {
2020-07-17 05:24:56 +03:00
type = map ( string )
2018-12-12 18:52:45 +03:00
default = { }
2023-05-08 09:24:50 +03:00
description = " A map of tags to set on every taggable resources. Empty by default. "
2018-12-12 18:52:45 +03:00
}
2019-03-20 21:29:05 +03:00
2022-12-08 04:41:13 +03:00
variable " threat_detection_policy " {
type = object (
{
enabled = optional ( bool )
disabled_alerts = optional ( set ( string ) )
email_account_admins = optional ( bool )
email_addresses = optional ( set ( string ) )
retention_days = optional ( number )
storage_account_access_key = optional ( string )
storage_endpoint = optional ( string )
}
)
2023-05-08 09:24:50 +03:00
default = null
description = " Threat detection policy configuration, known in the API as Server Security Alerts Policy "
sensitive = true
2022-12-08 04:41:13 +03:00
}
2023-05-08 04:18:14 +03:00
# tflint-ignore: terraform_unused_declarations
variable " tracing_tags_enabled " {
type = bool
default = false
2023-05-08 09:24:50 +03:00
description = " Whether enable tracing tags that generated by BridgeCrew Yor. "
2023-05-08 04:18:14 +03:00
nullable = false
}
# tflint-ignore: terraform_unused_declarations
variable " tracing_tags_prefix " {
type = string
default = " avm_ "
2023-05-08 09:24:50 +03:00
description = " Default prefix for generated tracing tags "
2023-05-08 04:18:14 +03:00
nullable = false
2023-05-08 09:24:50 +03:00
}
variable " vnet_rule_name_prefix " {
type = string
default = " postgresql-vnet-rule- "
description = " Specifies prefix for vnet rule names. "
}
variable " vnet_rules " {
type = list ( map ( string ) )
default = [ ]
description = " The list of maps, describing vnet rules. Valud map items: name, subnet_id. "
}