Hi Community members,
does anyone face similar issue? i’m encoding json using for_each and i noticed that jsonencode itself injecting in JSON roles definition.
resource “azurerm_role_definition” “definition” {
for_each = local.roles_json
name = justname
scope = data.azurerm_management_group.root_mg.id
description = “This is a custom role created via Terraform”
permissions {
actions = [ jsonencode(each.value.properties.permissions) ]
not_actions =
}
i would appreciate if you could please share your thoughts.