Auto update
This commit is contained in:
Родитель
2c8bc2731b
Коммит
9b26c7abc3
|
@ -4,6 +4,7 @@
|
|||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Correct runner pool name, add tracing tag toggle variables [\#76](https://github.com/Azure/terraform-azurerm-postgresql/pull/76) ([lonegunmanb](https://github.com/lonegunmanb))
|
||||
- Bump tflint azurerm ruleset version [\#70](https://github.com/Azure/terraform-azurerm-postgresql/pull/70) ([lonegunmanb](https://github.com/lonegunmanb))
|
||||
- Bump github.com/Azure/terraform-module-test-helper from 0.8.1 to 0.9.1 in /test [\#63](https://github.com/Azure/terraform-azurerm-postgresql/pull/63) ([dependabot[bot]](https://github.com/apps/dependabot))
|
||||
- Bump github.com/gruntwork-io/terratest from 0.41.10 to 0.41.11 in /test [\#62](https://github.com/Azure/terraform-azurerm-postgresql/pull/62) ([dependabot[bot]](https://github.com/apps/dependabot))
|
||||
|
|
|
@ -318,6 +318,8 @@ No modules.
|
|||
| <a name="input_storage_mb"></a> [storage\_mb](#input\_storage\_mb) | 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. | `number` | `102400` | no |
|
||||
| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to set on every taggable resources. Empty by default. | `map(string)` | `{}` | no |
|
||||
| <a name="input_threat_detection_policy"></a> [threat\_detection\_policy](#input\_threat\_detection\_policy) | Threat detection policy configuration, known in the API as Server Security Alerts Policy | <pre>object(<br> {<br> enabled = optional(bool)<br> disabled_alerts = optional(set(string))<br> email_account_admins = optional(bool)<br> email_addresses = optional(set(string))<br> retention_days = optional(number)<br> storage_account_access_key = optional(string)<br> storage_endpoint = optional(string)<br> }<br> )</pre> | `null` | no |
|
||||
| <a name="input_tracing_tags_enabled"></a> [tracing\_tags\_enabled](#input\_tracing\_tags\_enabled) | Whether enable tracing tags that generated by BridgeCrew Yor. | `bool` | `false` | no |
|
||||
| <a name="input_tracing_tags_prefix"></a> [tracing\_tags\_prefix](#input\_tracing\_tags\_prefix) | Default prefix for generated tracing tags | `string` | `"avm_"` | no |
|
||||
| <a name="input_vnet_rule_name_prefix"></a> [vnet\_rule\_name\_prefix](#input\_vnet\_rule\_name\_prefix) | Specifies prefix for vnet rule names. | `string` | `"postgresql-vnet-rule-"` | no |
|
||||
| <a name="input_vnet_rules"></a> [vnet\_rules](#input\_vnet\_rules) | The list of maps, describing vnet rules. Valud map items: name, subnet\_id. | `list(map(string))` | `[]` | no |
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
## 08 May 23 02:34 UTC
|
||||
|
||||
Success: true
|
||||
|
||||
### Versions
|
||||
|
||||
Terraform v1.4.5
|
||||
on linux_amd64
|
||||
+ provider registry.terraform.io/hashicorp/azurerm v3.55.0
|
||||
+ provider registry.terraform.io/hashicorp/random v3.5.1
|
||||
|
||||
### Error
|
||||
|
||||
|
||||
|
||||
---
|
||||
|
||||
## 07 May 23 00:17 UTC
|
||||
|
||||
Success: true
|
||||
|
|
|
@ -5,9 +5,9 @@ resource "random_id" "rg_name" {
|
|||
resource "random_password" "password" {
|
||||
length = 20
|
||||
min_lower = 1
|
||||
min_upper = 1
|
||||
min_numeric = 1
|
||||
min_special = 1
|
||||
min_upper = 1
|
||||
}
|
||||
|
||||
resource "azurerm_resource_group" "test" {
|
||||
|
|
|
@ -3,6 +3,6 @@ output "test_postgresql_server_id" {
|
|||
}
|
||||
|
||||
output "test_random_password" {
|
||||
value = random_password.password.result
|
||||
sensitive = true
|
||||
}
|
||||
value = random_password.password.result
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
variable "location" {
|
||||
type = string
|
||||
default = "westus"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,21 @@
|
|||
## 08 May 23 02:42 UTC
|
||||
|
||||
Success: true
|
||||
|
||||
### Versions
|
||||
|
||||
Terraform v1.4.5
|
||||
on linux_amd64
|
||||
+ provider registry.terraform.io/hashicorp/azurerm v3.55.0
|
||||
+ provider registry.terraform.io/hashicorp/random v3.5.1
|
||||
+ provider registry.terraform.io/hashicorp/time v0.9.1
|
||||
|
||||
### Error
|
||||
|
||||
|
||||
|
||||
---
|
||||
|
||||
## 07 May 23 00:22 UTC
|
||||
|
||||
Success: true
|
||||
|
|
9
main.tf
9
main.tf
|
@ -16,7 +16,14 @@ resource "azurerm_postgresql_server" "server" {
|
|||
public_network_access_enabled = var.public_network_access_enabled
|
||||
ssl_minimal_tls_version_enforced = var.ssl_minimal_tls_version_enforced
|
||||
storage_mb = var.storage_mb
|
||||
tags = var.tags
|
||||
tags = merge(var.tags, (/*<box>*/ (var.tracing_tags_enabled ? { for k, v in /*</box>*/ {
|
||||
avm_git_commit = "80225f6d5b9b27e0b5b4d0b83ec8a964823f27fe"
|
||||
avm_git_file = "main.tf"
|
||||
avm_git_last_modified_at = "2023-01-11 06:11:02"
|
||||
avm_git_org = "Azure"
|
||||
avm_git_repo = "terraform-azurerm-postgresql"
|
||||
avm_yor_trace = "bc8bef6b-3c56-4b35-a59f-ce0e55e68062"
|
||||
} /*<box>*/ : replace(k, "avm_", var.tracing_tags_prefix) => v } : {}) /*</box>*/))
|
||||
|
||||
dynamic "threat_detection_policy" {
|
||||
for_each = var.threat_detection_policy != null ? ["threat_detection_policy"] : []
|
||||
|
|
|
@ -5,8 +5,8 @@ output "administrator_login" {
|
|||
|
||||
output "administrator_password" {
|
||||
description = "The Password associated with the `administrator_login` for the PostgreSQL Server"
|
||||
value = var.administrator_password
|
||||
sensitive = true
|
||||
value = var.administrator_password
|
||||
}
|
||||
|
||||
output "database_ids" {
|
||||
|
@ -37,4 +37,4 @@ output "server_name" {
|
|||
output "vnet_rule_ids" {
|
||||
description = "The list of all vnet rule resource ids"
|
||||
value = [azurerm_postgresql_virtual_network_rule.vnet_rules[*].id]
|
||||
}
|
||||
}
|
||||
|
|
84
variables.tf
84
variables.tf
|
@ -1,146 +1,145 @@
|
|||
variable "administrator_login" {
|
||||
description = "The Administrator Login for the PostgreSQL Server. Changing this forces a new resource to be created."
|
||||
type = string
|
||||
description = "The Administrator Login for the PostgreSQL Server. Changing this forces a new resource to be created."
|
||||
}
|
||||
|
||||
variable "administrator_password" {
|
||||
type = string
|
||||
description = "The Password associated with the administrator_login for the PostgreSQL Server."
|
||||
sensitive = true
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "location" {
|
||||
description = "Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created."
|
||||
type = string
|
||||
description = "Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created."
|
||||
}
|
||||
|
||||
variable "resource_group_name" {
|
||||
description = "The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created."
|
||||
type = string
|
||||
description = "The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created."
|
||||
}
|
||||
|
||||
variable "server_name" {
|
||||
description = "Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created."
|
||||
type = string
|
||||
description = "Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created."
|
||||
}
|
||||
|
||||
variable "auto_grow_enabled" {
|
||||
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`."
|
||||
type = bool
|
||||
default = true
|
||||
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`."
|
||||
}
|
||||
|
||||
variable "backup_retention_days" {
|
||||
description = "Backup retention days for the server, supported values are between 7 and 35 days."
|
||||
type = number
|
||||
default = 7
|
||||
description = "Backup retention days for the server, supported values are between 7 and 35 days."
|
||||
}
|
||||
|
||||
variable "create_mode" {
|
||||
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.`"
|
||||
type = string
|
||||
default = "Default"
|
||||
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.`"
|
||||
nullable = false
|
||||
}
|
||||
|
||||
variable "creation_source_server_id" {
|
||||
description = "(Optional) For creation modes other than `Default`, the source server ID to use."
|
||||
type = string
|
||||
default = null
|
||||
description = "(Optional) For creation modes other than `Default`, the source server ID to use."
|
||||
}
|
||||
|
||||
variable "db_charset" {
|
||||
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."
|
||||
type = string
|
||||
default = "UTF8"
|
||||
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."
|
||||
}
|
||||
|
||||
variable "db_collation" {
|
||||
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."
|
||||
type = string
|
||||
default = "English_United States.1252"
|
||||
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."
|
||||
}
|
||||
|
||||
variable "db_names" {
|
||||
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."
|
||||
type = list(string)
|
||||
default = []
|
||||
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."
|
||||
}
|
||||
|
||||
variable "firewall_rule_prefix" {
|
||||
description = "Specifies prefix for firewall rule names."
|
||||
type = string
|
||||
default = "firewall-"
|
||||
description = "Specifies prefix for firewall rule names."
|
||||
}
|
||||
|
||||
variable "firewall_rules" {
|
||||
description = "The list of maps, describing firewall rules. Valid map items: name, start_ip, end_ip."
|
||||
type = list(map(string))
|
||||
default = []
|
||||
description = "The list of maps, describing firewall rules. Valid map items: name, start_ip, end_ip."
|
||||
}
|
||||
|
||||
variable "geo_redundant_backup_enabled" {
|
||||
description = "Enable Geo-redundant or not for server backup. Valid values for this property are Enabled or Disabled, not supported for the basic tier."
|
||||
type = bool
|
||||
default = true
|
||||
description = "Enable Geo-redundant or not for server backup. Valid values for this property are Enabled or Disabled, not supported for the basic tier."
|
||||
}
|
||||
|
||||
variable "infrastructure_encryption_enabled" {
|
||||
description = "Whether or not infrastructure is encrypted for this server"
|
||||
type = bool
|
||||
default = true
|
||||
description = "Whether or not infrastructure is encrypted for this server"
|
||||
}
|
||||
|
||||
variable "postgresql_configurations" {
|
||||
description = "A map with PostgreSQL configurations to enable."
|
||||
type = map(string)
|
||||
default = {}
|
||||
description = "A map with PostgreSQL configurations to enable."
|
||||
}
|
||||
|
||||
variable "public_network_access_enabled" {
|
||||
description = "Whether or not public network access is allowed for this server. Possible values are Enabled and Disabled."
|
||||
type = bool
|
||||
default = false
|
||||
description = "Whether or not public network access is allowed for this server. Possible values are Enabled and Disabled."
|
||||
}
|
||||
|
||||
variable "server_version" {
|
||||
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."
|
||||
type = string
|
||||
default = "9.5"
|
||||
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."
|
||||
}
|
||||
|
||||
variable "sku_name" {
|
||||
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)."
|
||||
type = string
|
||||
default = "GP_Gen5_4"
|
||||
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)."
|
||||
}
|
||||
|
||||
variable "ssl_enforcement_enabled" {
|
||||
description = "Specifies if SSL should be enforced on connections. Possible values are Enabled and Disabled."
|
||||
type = bool
|
||||
default = true
|
||||
description = "Specifies if SSL should be enforced on connections. Possible values are Enabled and Disabled."
|
||||
}
|
||||
|
||||
variable "ssl_minimal_tls_version_enforced" {
|
||||
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`."
|
||||
type = string
|
||||
default = "TLS1_2"
|
||||
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`."
|
||||
}
|
||||
|
||||
variable "storage_mb" {
|
||||
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."
|
||||
type = number
|
||||
default = 102400
|
||||
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."
|
||||
}
|
||||
|
||||
variable "tags" {
|
||||
description = "A map of tags to set on every taggable resources. Empty by default."
|
||||
type = map(string)
|
||||
default = {}
|
||||
description = "A map of tags to set on every taggable resources. Empty by default."
|
||||
}
|
||||
|
||||
variable "threat_detection_policy" {
|
||||
description = "Threat detection policy configuration, known in the API as Server Security Alerts Policy"
|
||||
type = object(
|
||||
{
|
||||
enabled = optional(bool)
|
||||
|
@ -152,34 +151,35 @@ variable "threat_detection_policy" {
|
|||
storage_endpoint = optional(string)
|
||||
}
|
||||
)
|
||||
sensitive = true
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "vnet_rule_name_prefix" {
|
||||
description = "Specifies prefix for vnet rule names."
|
||||
type = string
|
||||
default = "postgresql-vnet-rule-"
|
||||
}
|
||||
|
||||
variable "vnet_rules" {
|
||||
description = "The list of maps, describing vnet rules. Valud map items: name, subnet_id."
|
||||
type = list(map(string))
|
||||
default = []
|
||||
default = null
|
||||
description = "Threat detection policy configuration, known in the API as Server Security Alerts Policy"
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
# tflint-ignore: terraform_unused_declarations
|
||||
variable "tracing_tags_enabled" {
|
||||
type = bool
|
||||
description = "Whether enable tracing tags that generated by BridgeCrew Yor."
|
||||
default = false
|
||||
description = "Whether enable tracing tags that generated by BridgeCrew Yor."
|
||||
nullable = false
|
||||
}
|
||||
|
||||
# tflint-ignore: terraform_unused_declarations
|
||||
variable "tracing_tags_prefix" {
|
||||
type = string
|
||||
description = "Default prefix for generated tracing tags"
|
||||
default = "avm_"
|
||||
description = "Default prefix for generated tracing tags"
|
||||
nullable = false
|
||||
}
|
||||
}
|
||||
|
||||
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."
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче