Skip to content

Commit

Permalink
Merge pull request #87 from ruwinrmrrr/main-25674
Browse files Browse the repository at this point in the history
Remove standby availability zone variable from high availability optional block in postgre sql server module
  • Loading branch information
athiththan11 authored Aug 5, 2024
2 parents 2f06bf5 + 490f7fb commit e28327b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ resource "azurerm_postgresql_flexible_server" "postgresql_flexible_server" {
tags = var.tags

dynamic "high_availability" {
for_each = var.high_availability == null ? {} : var.high_availability
for_each = var.high_availability_mode != null ? [1] : []
content {
mode = var.high_availability.mode
standby_availability_zone = var.high_availability.standby_availability_zone
mode = var.high_availability_mode
standby_availability_zone = var.high_availability_standby_availability_zone
}
}

Expand Down
13 changes: 8 additions & 5 deletions modules/azurerm/PostgreSQL-Flexible-Server/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,14 @@ variable "source_server_id" {
type = string
}

variable "high_availability" {
variable "high_availability_mode" {
default = null
description = "The high availability mode for the PostgreSQL Flexible Server. Possible value are SameZone or ZoneRedundant"
type = object({
mode = string
standby_availability_zone = any
})
type = string
}

variable "high_availability_standby_availability_zone" {
default = null
description = "Specifies the Availability Zone in which the standby Flexible Server should be located."
type = any
}

0 comments on commit e28327b

Please sign in to comment.