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" {
7171 standby_availability_zone = lookup (high_availability. value , " standby_availability_zone" , 1 )
7272 }
7373 }
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+
7781 }
7882
7983 version = var. mysql_version
@@ -97,7 +101,7 @@ resource "azurerm_mysql_flexible_server_active_directory_administrator" "main" {
97101 object_id = var. entra_authentication . object_id
98102 tenant_id = data. azurerm_client_config . current . tenant_id
99103
100- depends_on = [ azurerm_mysql_flexible_server . main ]
104+ depends_on = [azurerm_mysql_flexible_server . main ]
101105}
102106
103107# #-----------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -21,9 +21,9 @@ output "azurerm_private_dns_zone_id" {
2121}
2222
2323output "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
2525 description = " Password Value"
26- sensitive = true
26+ sensitive = true
2727}
2828
2929
Original file line number Diff line number Diff line change @@ -298,7 +298,7 @@ variable "eventhub_authorization_rule_id" {
298298}
299299
300300variable "custom_tags" {
301- type = map (string )
301+ type = map (string )
302302 default = {}
303303}
304304
You can’t perform that action at this time.
0 commit comments