Skip to content

Commit

Permalink
Merge pull request #171 from tagolovina/patch-2
Browse files Browse the repository at this point in the history
Update Deploy-only-Service-Health-Alerts.md
  • Loading branch information
arjenhuitema authored May 13, 2024
2 parents 4f60ac3 + 748976b commit acf50b7
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,18 @@ The ```location``` variable refers to the deployment location. Deploying to mult
To deploy policy definitions to the intermediate management group, run the following command:

```bash
az deployment mg create --name "amba-ServiveHealthOnly" --template-file .\patterns\alz\policyDefinitions\policies-sh.json --location $location --management-group-id $pseudoRootManagementGroup
az deployment mg create --name "amba-ServiveHealthOnly" --template-file .\patterns\alz\policyDefinitions\policies-sh.json --location $location --management-group-id $pseudoRootManagementGroup --parameters '{ \"topLevelManagementGroupPrefix\": { \"value\": \"contoso\" } }'
```

{{< hint type=note >}}
The command doesn't work in Azure Cloud shell. In Azure Cloud Shell run the following command:
{{< /hint >}}

```bash
az deployment mg create --name "amba-ServiveHealthOnly" --template-file ./patterns/alz/policyDefinitions/policies-sh.json --location $location --management-group-id $pseudoRootManagementGroup --parameters topLevelManagementGroupPrefix=contoso
```


## 6. Assign the Service Health Policy Set Definition
Assign a Policy Set Definition by running the following command:

Expand All @@ -288,7 +297,7 @@ az deployment mg create --name "amba-ServiceHealthAssignment" --template-file .\
```

{{< hint type=important >}}
The final parameter is the ```--parameters``` parameter, which is used to pass a JSON string that contains the parameters for the deployment. The JSON string is enclosed in single quotes and contains escaped double quotes for the keys and values of the parameters.
The final parameter is the ```--parameters``` parameter, which is used to pass a JSON string that contains the parameters for the deployment. The JSON string is enclosed in single quotes and contains escaped double quotes for the keys and values of the parameters. It is possible to create a parameter file instead of using a json-string.

The JSON object contains two parameters: ```topLevelManagementGroupPrefix``` and ```policyAssignmentParameters```. The ```topLevelManagementGroupPrefix``` parameter is used to specify the intermediate root management group, and should _coincide_ with the value of the ```pseudoRootManagementGroup```. The ```policyAssignmentParameters``` parameter is an object that contains the values for the parameters that are used to configure the monitoring resource group. The parameters include the name of the resource group, the tags for the resource group, the location of the resource group, and the email address for the action group associated with the Service Health Policy Set Definition.
{{< /hint >}}
Expand Down

0 comments on commit acf50b7

Please sign in to comment.