diff --git a/examples/definitions.tf b/examples/definitions.tf index 4fd188d..7c84dbe 100644 --- a/examples/definitions.tf +++ b/examples/definitions.tf @@ -24,8 +24,8 @@ module "whitelist_regions" { # create definitions by looping around all files found under the Monitoring category folder module "deploy_resource_diagnostic_setting" { source = "..//modules/definition" - for_each = toset([for p in fileset(path.cwd, "../policies/Monitoring/*.json") : basename(p)]) - policy_name = trimsuffix(each.key, ".json") + for_each = toset([for p in fileset(path.cwd, "../policies/Monitoring/*.json") : trimsuffix(basename(p), ".json")]) + policy_name = each.key policy_category = "Monitoring" management_group_id = data.azurerm_management_group.org.id }