Created
August 11, 2020 12:37
-
-
Save sunckell/a9aec49f07fe3d606379c3886ef9455e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dynamic "statement" { | |
for_each = [for s in var.additional_bucket_policy_statements : { | |
sid = lookup(s, "sid", null) | |
effect = lookup(s, "effect", null) | |
actions = lookup(s, "actions", null) | |
resources = lookup(s, "resources", null) | |
principals = lookup(s, "principals", null) | |
condition = lookup(s, "condition", null) | |
}] | |
content { | |
sid = statement.value.sid | |
effect = statement.value.effect | |
actions = statement.value.actions | |
resources = statement.value.resources | |
dynamic "principals" { | |
for_each = statement.value.principals | |
content { | |
type = lookup(principals.value, "type", null) | |
identifiers = lookup(principals.value, "identifiers", null) | |
} | |
} | |
dynamic "condition" { | |
for_each = statement.value.condition | |
content { | |
test = lookup(condition.value, "test", null) | |
variable = lookup(condition.value, "variable", null) | |
values = lookup(condition.value, "values", null) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment