File tree Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -71,9 +71,13 @@ resource "azurerm_mysql_flexible_server" "main" {
71
71
standby_availability_zone = lookup (high_availability. value , " standby_availability_zone" , 1 )
72
72
}
73
73
}
74
- identity {
75
- type = var. identity_type
76
- identity_ids = var. identity_type == " UserAssigned" ? var. user_assigned_identity_ids : []
74
+ dynamic "identity" {
75
+ for_each = toset (var. identity_type != null ? [var . identity_type ] : [])
76
+ content {
77
+ type = var. identity_type
78
+ identity_ids = var. identity_type == " UserAssigned" ? var. user_assigned_identity_ids : []
79
+ }
80
+
77
81
}
78
82
79
83
version = var. mysql_version
@@ -97,7 +101,7 @@ resource "azurerm_mysql_flexible_server_active_directory_administrator" "main" {
97
101
object_id = var. entra_authentication . object_id
98
102
tenant_id = data. azurerm_client_config . current . tenant_id
99
103
100
- depends_on = [ azurerm_mysql_flexible_server . main ]
104
+ depends_on = [azurerm_mysql_flexible_server . main ]
101
105
}
102
106
103
107
# #-----------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -21,9 +21,9 @@ output "azurerm_private_dns_zone_id" {
21
21
}
22
22
23
23
output "password_result" {
24
- value = var. admin_password == null ? random_password. main [0 ]. result : var. admin_password
24
+ value = var. admin_password == null ? random_password. main [0 ]. result : var. admin_password
25
25
description = " Password Value"
26
- sensitive = true
26
+ sensitive = true
27
27
}
28
28
29
29
Original file line number Diff line number Diff line change @@ -298,7 +298,7 @@ variable "eventhub_authorization_rule_id" {
298
298
}
299
299
300
300
variable "custom_tags" {
301
- type = map (string )
301
+ type = map (string )
302
302
default = {}
303
303
}
304
304
You can’t perform that action at this time.
0 commit comments