Skip to content

Commit

Permalink
fix identity block
Browse files Browse the repository at this point in the history
  • Loading branch information
d4kverma committed Oct 30, 2024
1 parent 6bdd32c commit 0bbdb3e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,13 @@ resource "azurerm_mysql_flexible_server" "main" {
standby_availability_zone = lookup(high_availability.value, "standby_availability_zone", 1)
}
}
identity {
type = var.identity_type
dynamic "identity" {
for_each = toset(var.identity_type != null ? [var.identity_type] : [])
content {
type = var.identity_type
identity_ids = var.identity_type == "UserAssigned" ? var.user_assigned_identity_ids : []
}

}

version = var.mysql_version
Expand Down

0 comments on commit 0bbdb3e

Please sign in to comment.