Skip to content

Commit 0fa170f

Browse files
author
Hauke Brandt
committed
References in storage share are now correct
1 parent a787053 commit 0fa170f

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

main.tf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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.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] : []
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,21 +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
201+
access_tier = local.storage_share[each.key].access_tier
202+
enabled_protocol = local.storage_share[each.key].enabled_protocol
203203
quota = local.storage_share[each.key].quota
204204

205205
dynamic "acl" {
206206
for_each = local.storage_share[each.key].acl != {} ? [1] : []
207207
content {
208-
id = local.storage_account[each.key].acl[acl.key].id
208+
id = local.storage_share[each.key].acl[acl.key].id
209209

210210
dynamic "access_policy" {
211211
for_each = local.storage_share[each.key].acl[acl.key].access_policy != {} ? [1] : []
212212
content {
213-
permissions = local.storage_account[each.key].acl[acl.key].access_policy[access_policy.key].permissions
214-
start = local.storage_account[each.key].acl[acl.key].access_policy[access_policy.key].start
215-
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
216216
}
217217
}
218218
}

variables.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ locals {
8585
tags = {}
8686
}
8787
storage_share = {
88-
name = ""
89-
metadata = {}
90-
access_tier = "Hot"
88+
name = ""
89+
metadata = {}
90+
access_tier = "Hot"
9191
enabled_protocol = null
92-
quota = "50"
93-
acl = {}
94-
tags = {}
92+
quota = "50"
93+
acl = {}
94+
tags = {}
9595
}
9696
storage_share_directory = {
9797
name = ""

0 commit comments

Comments
 (0)