Created
June 26, 2020 08:01
-
-
Save jesseloudon/a5d05c81a63a12adb548ff555c549e87 to your computer and use it in GitHub Desktop.
For each policy definition id reference each input variable created above using ${var.variableName}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "azurerm_policy_set_definition" "tag_governance" { | |
name = "tag_governance" | |
policy_type = "Custom" | |
display_name = "Tag Governance" | |
description = "Contains common Tag Governance policies" | |
metadata = <<METADATA | |
{ | |
"category": "${var.policyset_definition_category}" | |
} | |
METADATA | |
policy_definitions = <<POLICY_DEFINITIONS | |
[ | |
{ | |
"policyDefinitionId": "${var.addTagToRG_policy_id_0}" | |
}, | |
{ | |
"policyDefinitionId": "${var.addTagToRG_policy_id_1}" | |
}, | |
{ | |
"policyDefinitionId": "${var.addTagToRG_policy_id_2}" | |
}, | |
{ | |
"policyDefinitionId": "${var.addTagToRG_policy_id_3}" | |
}, | |
{ | |
"policyDefinitionId": "${var.addTagToRG_policy_id_4}" | |
}, | |
{ | |
"policyDefinitionId": "${var.addTagToRG_policy_id_5}" | |
} | |
] | |
POLICY_DEFINITIONS | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment