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

Feature Request: Create an initiative where the policy parameters are not transformed into initiative parameters

fdmsantos opened this issue · comments

Thanks very much for the module.

When creating an initiative with policies that have parameters, it appears that all policy parameters are transformed into initiative parameters, and then we need to fill out these parameters in assignments. Is it possible to define the policy parameters directly on the initiative without transforming them into initiative parameters?

image

I'm referring to the "Set Value" option in the Policy Parameters tab when creating an initiative.

Hi @fdmsantos, thanks for raising this issue. This could be implemented with a new input variable for parameters but the tricky part is coupling these with definition references. The module attempts to simplify this workflow by eliminating the need to generate long lines of code so in essence enabling this will defeat its purpose and we may as well fallback to using the native resource.

Apologies if I've misunderstood the feature request, but please feel free to share some example code/suggestions or raise a PR.

Thanks!