mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
ensure bucket root is included in s3 iam policy rules
This commit is contained in:
parent
e32b783b35
commit
2973a4f2f1
1 changed files with 4 additions and 4 deletions
|
|
@ -1,10 +1,10 @@
|
|||
# Dynamically build S3 resources list from bucket ARNs and resource paths
|
||||
locals {
|
||||
# Generate full resource ARNs by combining bucket ARNs with resource paths
|
||||
resources = flatten([
|
||||
for bucket_arn in var.bucket_arns : [
|
||||
for path in var.resource_paths : "${bucket_arn}${path}"
|
||||
]
|
||||
for bucket_arn in var.bucket_arns : concat(
|
||||
[bucket_arn], # bare ARN for bucket-level actions like ListBucket
|
||||
[for path in var.resource_paths : "${bucket_arn}${path}"]
|
||||
)
|
||||
])
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue