Initiative with BuiltIn and Custom Policies #120
Closed
AnshuBhatiaGit
started this conversation in
General
Replies: 1 comment
-
merge_effects = false solved the issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am facing issues when I create an initiative with both built and custom policies. I have an initiative with 2 builtin policies with effect (Audit, AuditIfNotExists) and 4 custom policies with effect(Audit) so how do I implement the two effects in the code. Is there a way to define policy parameters for builtin policies that specific builtin policies uses the effect associated with that builtin policy?
I have the below initiative.
I have this code to create the initiative.
It gives me this error.
Error: updating Scoped Policy Assignment (Scope: "/subscriptions/xxxxx"
│ Policy Assignment Name: "tf - network"): unexpected status 400 (400 Bad Request) with error: PolicyParameterValueNotAllowed: The value 'AuditIfNotExists' is not allowed for policy parameter 'effect' in policy definition 'TF - Network version 1.0.0'. The allowed values are 'Audit, Disabled'.
│
│ with module.asgmnt_network.azurerm_subscription_policy_assignment.set[0],
│ on ../modules/set_assignment/main.tf line 62, in resource "azurerm_subscription_policy_assignment" "set":
│ 62: resource "azurerm_subscription_policy_assignment" "set" {
│
│ updating Scoped Policy Assignment (Scope: "/subscriptions/xxxxxxx"
│ Policy Assignment Name: "tf - network"): unexpected status 400 (400 Bad Request) with error: PolicyParameterValueNotAllowed: The value 'AuditIfNotExists' is not allowed for policy parameter 'effect' in policy definition 'TF
│ - Network version 1.0.0'. The allowed values are 'Audit, Disabled'.
╵
It is giving error because the effect "AuditIfNotExists" is not defined but not sure how to resolve this.
Should I use merge_effects = false in the code?
Any help is appreciated. Thanks a lot.
Beta Was this translation helpful? Give feedback.
All reactions