Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 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
identity_ids = var.identity_type == "UserAssigned" ? var.user_assigned_identity_ids : []
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 All @@ -97,7 +101,7 @@ resource "azurerm_mysql_flexible_server_active_directory_administrator" "main" {
object_id = var.entra_authentication.object_id
tenant_id = data.azurerm_client_config.current.tenant_id

depends_on = [ azurerm_mysql_flexible_server.main ]
depends_on = [azurerm_mysql_flexible_server.main]
}

##-----------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ output "azurerm_private_dns_zone_id" {
}

output "password_result" {
value = var.admin_password == null ? random_password.main[0].result : var.admin_password
value = var.admin_password == null ? random_password.main[0].result : var.admin_password
description = "Password Value"
sensitive = true
sensitive = true
}


Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ variable "eventhub_authorization_rule_id" {
}

variable "custom_tags" {
type = map(string)
type = map(string)
default = {}
}

Expand Down
Loading