-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocals.tf
42 lines (39 loc) · 1.35 KB
/
locals.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
locals {
location = "northeurope"
naming = {
policy_1 = "SEY-TERRAFORM-POLICY01"
}
policy = [
{
name = local.naming.policy_1
policy_type = "Custom"
display_name = local.naming.policy_1
management_group_id = "/providers/Microsoft.Management/managementGroups/666-666-666-666-666" # replace with your own
description = "Policy initiative to enforce tagging on the RG level."
metadata = jsonencode({
category = "Tags"
})
parameters = "${path.module}/parameters/SEY-TERRAFORM-POLICY01.json"
policy_definition_reference = [
{
reference_id : "RequiredRGTagServiceOwner",
policy_definition_id : "/providers/Microsoft.Authorization/policyDefinitions/96670d01-0a4d-4649-9c89-2d3abc0a5025",
parameter_values = <<VALUE
{
"tagName" : {"value" : "[parameters('RequiredRGTagServiceOwner')]"}
}
VALUE
},
{
reference_id : "RequiredRGTagAPMID",
policy_definition_id : "/providers/Microsoft.Authorization/policyDefinitions/96670d01-0a4d-4649-9c89-2d3abc0a5025",
parameter_values = <<VALUE
{
"tagName" : {"value" : "[parameters('RequiredRGTagAPMID')]"}
}
VALUE
}
]
}
]
}