Skip to content

Commit

Permalink
Added params and telemetry tracking to generated policies
Browse files Browse the repository at this point in the history
  • Loading branch information
judyer28 committed Dec 18, 2024
1 parent e3ee803 commit 1ee20b6
Show file tree
Hide file tree
Showing 614 changed files with 34,329 additions and 4,291 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,44 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"displayName": {
"defaultValue": "Deploy AVS privateClouds EffectiveCpuAverage Alert",
"type": "String",
"metadata": {
"description": "Display name of policy"
}
},
"description": {
"defaultValue": "Policy to Audit/Deploy AVS privateClouds EffectiveCpuAverage Alert",
"type": "String",
"metadata": {
"description": "Description of policy"
}
},
"currentDateTimeUtcNow": {
"defaultValue": "[utcNow()]",
"type": "String",
"metadata": {
"description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
}
},
"telemetryOptOut": {
"defaultValue": "No",
"allowedValues": [
"Yes",
"No"
],
"type": "String",
"metadata": {
"description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
}
}
},
"variables": {
"pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(managementGroup().id, parameters('currentDateTimeUtcNow'))), 64)]",
"location": "[deployment().location]"
},
"resources": [
{
"type": "Microsoft.Authorization/policyDefinitions",
Expand All @@ -9,16 +47,12 @@
"properties": {
"policyType": "Custom",
"mode": "All",
"displayName": "Deploy AVS privateClouds EffectiveCpuAverage Alert",
"description": "Policy to Audit/Deploy AVS privateClouds EffectiveCpuAverage Alert",
"displayName": "[parameters('displayName')]",
"description": "[parameters('description')]",
"metadata": {
"version": "1.0.0-preview",
"version": "1.0.0",
"category": "AVS",
"preview": true,
"source": "https://github.com/Azure/azure-monitor-baseline-alerts/",
"alzCloudEnvironments": [
"AzureCloud"
],
"_deployed_by_amba": "True"
},
"parameters": {
Expand Down Expand Up @@ -334,6 +368,21 @@
}
}
}
},
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2023-07-01",
"name": "[variables('pidDeploymentName')]",
"location": "[variables('location')]",
"properties": {
"mode": "Incremental",
"template": {
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": []
}
},
"condition": "[equals(parameters('telemetryOptOut'), 'No')]"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,44 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"displayName": {
"defaultValue": "Deploy AVS privateClouds EffectiveCpuAverage Alert",
"type": "String",
"metadata": {
"description": "Display name of policy"
}
},
"description": {
"defaultValue": "Policy to Audit/Deploy AVS privateClouds EffectiveCpuAverage Alert",
"type": "String",
"metadata": {
"description": "Description of policy"
}
},
"currentDateTimeUtcNow": {
"defaultValue": "[utcNow()]",
"type": "String",
"metadata": {
"description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
}
},
"telemetryOptOut": {
"defaultValue": "No",
"allowedValues": [
"Yes",
"No"
],
"type": "String",
"metadata": {
"description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
}
}
},
"variables": {
"pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(managementGroup().id, parameters('currentDateTimeUtcNow'))), 64)]",
"location": "[deployment().location]"
},
"resources": [
{
"type": "Microsoft.Authorization/policyDefinitions",
Expand All @@ -9,16 +47,12 @@
"properties": {
"policyType": "Custom",
"mode": "All",
"displayName": "Deploy AVS privateClouds EffectiveCpuAverage Alert",
"description": "Policy to Audit/Deploy AVS privateClouds EffectiveCpuAverage Alert",
"displayName": "[parameters('displayName')]",
"description": "[parameters('description')]",
"metadata": {
"version": "1.0.0-preview",
"version": "1.0.0",
"category": "AVS",
"preview": true,
"source": "https://github.com/Azure/azure-monitor-baseline-alerts/",
"alzCloudEnvironments": [
"AzureCloud"
],
"_deployed_by_amba": "True"
},
"parameters": {
Expand Down Expand Up @@ -334,6 +368,21 @@
}
}
}
},
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2023-07-01",
"name": "[variables('pidDeploymentName')]",
"location": "[variables('location')]",
"properties": {
"mode": "Incremental",
"template": {
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": []
}
},
"condition": "[equals(parameters('telemetryOptOut'), 'No')]"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,44 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"displayName": {
"defaultValue": "Deploy AVS privateClouds DiskUsedPercentage Alert",
"type": "String",
"metadata": {
"description": "Display name of policy"
}
},
"description": {
"defaultValue": "Policy to Audit/Deploy AVS privateClouds DiskUsedPercentage Alert",
"type": "String",
"metadata": {
"description": "Description of policy"
}
},
"currentDateTimeUtcNow": {
"defaultValue": "[utcNow()]",
"type": "String",
"metadata": {
"description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
}
},
"telemetryOptOut": {
"defaultValue": "No",
"allowedValues": [
"Yes",
"No"
],
"type": "String",
"metadata": {
"description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
}
}
},
"variables": {
"pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(managementGroup().id, parameters('currentDateTimeUtcNow'))), 64)]",
"location": "[deployment().location]"
},
"resources": [
{
"type": "Microsoft.Authorization/policyDefinitions",
Expand All @@ -9,16 +47,12 @@
"properties": {
"policyType": "Custom",
"mode": "All",
"displayName": "Deploy AVS privateClouds DiskUsedPercentage Alert",
"description": "Policy to Audit/Deploy AVS privateClouds DiskUsedPercentage Alert",
"displayName": "[parameters('displayName')]",
"description": "[parameters('description')]",
"metadata": {
"version": "1.0.0-preview",
"version": "1.0.0",
"category": "AVS",
"preview": true,
"source": "https://github.com/Azure/azure-monitor-baseline-alerts/",
"alzCloudEnvironments": [
"AzureCloud"
],
"_deployed_by_amba": "True"
},
"parameters": {
Expand Down Expand Up @@ -334,6 +368,21 @@
}
}
}
},
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2023-07-01",
"name": "[variables('pidDeploymentName')]",
"location": "[variables('location')]",
"properties": {
"mode": "Incremental",
"template": {
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": []
}
},
"condition": "[equals(parameters('telemetryOptOut'), 'No')]"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,44 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"displayName": {
"defaultValue": "Deploy AVS privateClouds UsageAverage Alert",
"type": "String",
"metadata": {
"description": "Display name of policy"
}
},
"description": {
"defaultValue": "Policy to Audit/Deploy AVS privateClouds UsageAverage Alert",
"type": "String",
"metadata": {
"description": "Description of policy"
}
},
"currentDateTimeUtcNow": {
"defaultValue": "[utcNow()]",
"type": "String",
"metadata": {
"description": "The current date and time using the utcNow function. Used for deployment name uniqueness"
}
},
"telemetryOptOut": {
"defaultValue": "No",
"allowedValues": [
"Yes",
"No"
],
"type": "String",
"metadata": {
"description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry."
}
}
},
"variables": {
"pidDeploymentName": "[take(concat('pid-8bb7cf8a-bcf7-4264-abcb-703ace2fc84d-', uniqueString(managementGroup().id, parameters('currentDateTimeUtcNow'))), 64)]",
"location": "[deployment().location]"
},
"resources": [
{
"type": "Microsoft.Authorization/policyDefinitions",
Expand All @@ -9,16 +47,12 @@
"properties": {
"policyType": "Custom",
"mode": "All",
"displayName": "Deploy AVS privateClouds UsageAverage Alert",
"description": "Policy to Audit/Deploy AVS privateClouds UsageAverage Alert",
"displayName": "[parameters('displayName')]",
"description": "[parameters('description')]",
"metadata": {
"version": "1.0.0-preview",
"version": "1.0.0",
"category": "AVS",
"preview": true,
"source": "https://github.com/Azure/azure-monitor-baseline-alerts/",
"alzCloudEnvironments": [
"AzureCloud"
],
"_deployed_by_amba": "True"
},
"parameters": {
Expand Down Expand Up @@ -334,6 +368,21 @@
}
}
}
},
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2023-07-01",
"name": "[variables('pidDeploymentName')]",
"location": "[variables('location')]",
"properties": {
"mode": "Incremental",
"template": {
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": []
}
},
"condition": "[equals(parameters('telemetryOptOut'), 'No')]"
}
]
}
Loading

0 comments on commit 1ee20b6

Please sign in to comment.