gettek / terraform-azurerm-policy-as-code

Terraform modules that simplify the workflow of custom and built-in Azure Policies

Home Page:https://learn.microsoft.com/en-us/azure/governance/policy/concepts/policy-as-code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Policy initiative set effect per policy definition

mezzofix opened this issue · comments

Hello,

I'm unable to figure out how could I set the effects for each single policy definition inside a policy set when assigning that policy set to a scope. Right now, it looks that I can set one for the entire policy set.

This is what I'm looking for

Hi @mezzofix

You may set merge_effects = false or merge_parameters = false as seen in the initiative readme.

Hi @gettek

thank you ! Each policy definition within the Initiative is using a distinct effect parameter. Am I doing this correct (please see the screen shot).
obraz

Many thanks !

Hi @mezzofix, are you using the initiative module? If so it will suffix "effect_" to each policy definition reference Id as seen in this example. To get the list of respective parameters that you can specify at assignment you can output the policy_definition_reference.parameter_values.

In your screen shot above it looks like you are using the parameter displayName which is incorrect, but if you are using a built-in initiative you can refer to its parameter names in the definition structure itself.