Skip to content

Commit

Permalink
fix: Added availability zone parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
dploeger committed May 20, 2022
1 parent 577cf74 commit 89188be
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,14 @@ Type: `bool`

Default: `true`

### availability\_zone

Description: The availability zone the Flexible Server should be placed in (only flexible server)

Type: `number`

Default: `1`

### backup\_retention\_days

Description: Number of days to keep backups
Expand Down Expand Up @@ -195,7 +203,7 @@ Default: `false`

Description: A map of server parameters to set

Type: `set(string)`
Type: `map(string)`

Default: `{}`

Expand Down
1 change: 1 addition & 0 deletions server.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ resource "azurerm_postgresql_flexible_server" "server" {
sku_name = var.database_host_sku
storage_mb = var.database_storage
backup_retention_days = var.backup_retention_days
zone = var.availability_zone
}

locals {
Expand Down
5 changes: 5 additions & 0 deletions vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,8 @@ variable "params" {
description = "A map of server parameters to set"
default = {}
}

variable "availability_zone" {
default = 1
description = "The availability zone the Flexible Server should be placed in (only flexible server)"
}

0 comments on commit 89188be

Please sign in to comment.