This repository was archived by the owner on May 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ terraform {
2
2
required_providers {
3
3
azurerm = {
4
4
source = " hashicorp/azurerm"
5
- version = " >= 2.20 .0"
5
+ version = " >= 2.33 .0"
6
6
}
7
7
}
8
8
required_version = " >= 0.13"
Original file line number Diff line number Diff line change @@ -96,10 +96,11 @@ process_policysetdef() {
96
96
echo " policy_definition_reference {"
97
97
echo $dep | jq -r ' " policy_definition_id = \"\(.policyDefinitionId)\""'
98
98
echo $dep | jq -r ' " reference_id = \"\(.policyDefinitionReferenceId)\""'
99
- echo " parameters = { "
100
- echo $dep | jq -r ' .parameters | to_entries | .[] | " \(.key) = \"\(.value.value)\"" '
101
- echo " } "
99
+ echo " parameter_values = <<VALUES "
100
+ echo $dep | jq -r ' .parameters'
101
+ echo " VALUES "
102
102
echo " }"
103
+ echo
103
104
done)
104
105
if [ ! " $POLICYSETPARAMETERS " == " {}" ] && [ ! " $POLICYSETPARAMETERS " == " null" ]; then
105
106
local POLICYSETPARAMETERLINE=" parameters = <<PARAMETERS
@@ -119,7 +120,9 @@ resource "azurerm_policy_set_definition" "${TFNAME}" {
119
120
depends_on = [
120
121
$POLICYSETDEPS
121
122
]
123
+
122
124
$POLICYDEFREFERENCE
125
+
123
126
$POLICYSETPARAMETERLINE
124
127
}
125
128
@@ -191,7 +194,7 @@ find $REFDIR -iname *policySetDefinitions* -print0 | xargs -0 -I % -n 1 -P 8 bas
191
194
192
195
# Replace MG prefix if specified
193
196
echo " Changing policyDefinitions refs in policysets"
194
- find $OUTDIR -iname \* policyset\* .tf | xargs -n 1 -P 8 sed -i ' s/\/contoso \//\/${var.management_group_name}\//g'
197
+ find $OUTDIR -iname \* policyset\* .tf | xargs -n 1 -P 8 sed -i ' s/\/ESLZ \//\/${var.management_group_name}\//g'
195
198
196
199
# Terraform fmt
197
200
if [ $( command -v terraform) ]; then
You can’t perform that action at this time.
0 commit comments