@@ -52,7 +52,7 @@ resource "azurerm_storage_account" "storage_account" {
5252 }
5353
5454 dynamic "blob_properties" {
55- for_each = local. storage_account [each . key ]. blob_properties != {} ? [1 ] : []
55+ for_each = local. storage_account [each . key ]. account_kind != " FileStorage " ? [1 ] : []
5656 content {
5757 versioning_enabled = local. storage_account [each . key ]. blob_properties . versioning_enabled
5858 change_feed_enabled = local. storage_account [each . key ]. blob_properties . change_feed_enabled
@@ -84,7 +84,7 @@ resource "azurerm_storage_account" "storage_account" {
8484 }
8585
8686 dynamic "queue_properties" {
87- for_each = local. storage_account [each . key ]. queue_properties != {} ? [1 ] : []
87+ for_each = local. storage_account [each . key ]. queue_properties . cors_rule != {} || local . storage_account [ each . key ] . queue_properties . logging != {} || local . storage_account [ each . key ] . queue_properties . minute_metrics != {} || local . storage_account [ each . key ] . queue_properties . hour_metrics != {} ? [1 ] : []
8888 content {
8989 dynamic "cors_rule" {
9090 for_each = local. storage_account [each . key ]. queue_properties . cors_rule
@@ -198,19 +198,21 @@ resource "azurerm_storage_share" "storage_share" {
198198 name = local. storage_share [each . key ]. name == " " ? each. key : local. storage_share [each . key ]. name
199199 metadata = local. storage_share [each . key ]. metadata
200200 storage_account_name = local. storage_share [each . key ]. storage_account_name
201+ access_tier = local. storage_share [each . key ]. access_tier
202+ enabled_protocol = local. storage_share [each . key ]. enabled_protocol
201203 quota = local. storage_share [each . key ]. quota
202204
203205 dynamic "acl" {
204- for_each = local. storage_account [each . key ]. acl == true ? [1 ] : []
206+ for_each = local. storage_share [each . key ]. acl != {} ? [1 ] : []
205207 content {
206- id = local. storage_account [each . key ]. acl [acl . key ]. id
208+ id = local. storage_share [each . key ]. acl [acl . key ]. id
207209
208210 dynamic "access_policy" {
209- for_each = local. storage_account [each . key ]. acl [acl . key ]. access_policy
211+ for_each = local. storage_share [each . key ]. acl [acl . key ]. access_policy != {} ? [ 1 ] : []
210212 content {
211- permissions = local. storage_account [each . key ]. acl [acl . key ]. access_policy [access_policy . key ]. permissions
212- start = local. storage_account [each . key ]. acl [acl . key ]. access_policy [access_policy . key ]. start
213- expiry = local. storage_account [each . key ]. acl [acl . key ]. access_policy [access_policy . key ]. expiry
213+ permissions = local. storage_share [each . key ]. acl [acl . key ]. access_policy [access_policy . key ]. permissions
214+ start = local. storage_share [each . key ]. acl [acl . key ]. access_policy [access_policy . key ]. start
215+ expiry = local. storage_share [each . key ]. acl [acl . key ]. access_policy [access_policy . key ]. expiry
214216 }
215217 }
216218 }
0 commit comments