mirror of
https://dev.azure.com/effectory/Survey%20Software/_git/Cloud%20Engineering
synced 2026-02-27 18:52:18 +01:00
Initial commit
This commit is contained in:
52
Policies/service bus queue policy.json
Normal file
52
Policies/service bus queue policy.json
Normal file
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"properties": {
|
||||
"displayName": "Service Bus Queue must have Time to Live (TTL) of 14 days.",
|
||||
"policyType": "Custom",
|
||||
"mode": "All",
|
||||
"description": "This policy enables you to restrict service bus queues with TTL other than 2 weeks.",
|
||||
"metadata": {
|
||||
"category": "Service Bus",
|
||||
"createdBy": "c6025a2e-416c-42da-96ef-dd507382793a",
|
||||
"createdOn": "2020-04-01T13:25:04.7464348Z",
|
||||
"updatedBy": "c6025a2e-416c-42da-96ef-dd507382793a",
|
||||
"updatedOn": "2020-04-03T11:50:29.9215728Z"
|
||||
},
|
||||
"parameters": {
|
||||
"effect": {
|
||||
"type": "String",
|
||||
"metadata": {
|
||||
"displayName": "Effect",
|
||||
"description": "Enable or disable the execution of the policy"
|
||||
},
|
||||
"allowedValues": [
|
||||
"audit",
|
||||
"deny",
|
||||
"disabled"
|
||||
],
|
||||
"defaultValue": "audit"
|
||||
}
|
||||
},
|
||||
"policyRule": {
|
||||
"if": {
|
||||
"allOf": [
|
||||
{
|
||||
"field": "type",
|
||||
"equals": "Microsoft.ServiceBus/namespaces/queues"
|
||||
},
|
||||
{
|
||||
"not": {
|
||||
"field": "Microsoft.ServiceBus/namespaces/queues/defaultMessageTimeToLive",
|
||||
"equals": "P14D"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"effect": "[parameters('effect')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": "/providers/Microsoft.Management/managementGroups/e9792fd7-4044-47e7-a40d-3fba46f1cd09/providers/Microsoft.Authorization/policyDefinitions/b8e823fc-5c2b-4ebe-b9fc-2d4524bc5ae5",
|
||||
"type": "Microsoft.Authorization/policyDefinitions",
|
||||
"name": "b8e823fc-5c2b-4ebe-b9fc-2d4524bc5ae5"
|
||||
}
|
||||
52
Policies/service bus subscription policy.json
Normal file
52
Policies/service bus subscription policy.json
Normal file
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"properties": {
|
||||
"displayName": "Service Bus Subscription must have Time to Live (TTL) of 14 days.",
|
||||
"policyType": "Custom",
|
||||
"mode": "All",
|
||||
"description": "This policy enables you to restrict service bus queue subscriptions with TTL other than 2 weeks.",
|
||||
"metadata": {
|
||||
"category": "Service Bus",
|
||||
"createdBy": "c6025a2e-416c-42da-96ef-dd507382793a",
|
||||
"createdOn": "2020-04-03T11:50:04.4806377Z",
|
||||
"updatedBy": null,
|
||||
"updatedOn": null
|
||||
},
|
||||
"parameters": {
|
||||
"effect": {
|
||||
"type": "String",
|
||||
"metadata": {
|
||||
"displayName": "Effect",
|
||||
"description": "Enable or disable the execution of the policy"
|
||||
},
|
||||
"allowedValues": [
|
||||
"audit",
|
||||
"deny",
|
||||
"disabled"
|
||||
],
|
||||
"defaultValue": "audit"
|
||||
}
|
||||
},
|
||||
"policyRule": {
|
||||
"if": {
|
||||
"allOf": [
|
||||
{
|
||||
"field": "type",
|
||||
"equals": "Microsoft.ServiceBus/namespaces/topics/subscriptions"
|
||||
},
|
||||
{
|
||||
"not": {
|
||||
"field": "Microsoft.ServiceBus/namespaces/topics/subscriptions/defaultMessageTimeToLive",
|
||||
"equals": "P14D"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"effect": "[parameters('effect')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": "/providers/Microsoft.Management/managementGroups/ManagementGroup_SurveySoftware/providers/Microsoft.Authorization/policyDefinitions/60f3692c-286d-4184-8e2b-52d76716d947",
|
||||
"type": "Microsoft.Authorization/policyDefinitions",
|
||||
"name": "60f3692c-286d-4184-8e2b-52d76716d947"
|
||||
}
|
||||
66
Policies/service bus topic policy.json
Normal file
66
Policies/service bus topic policy.json
Normal file
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"properties": {
|
||||
"displayName": "Service Bus Topic must have Time to Live (TTL) of equal or less than 14 days",
|
||||
"policyType": "Custom",
|
||||
"mode": "All",
|
||||
"description": "This policy enables you to restrict services bus topic and subscriptions with TTL more than 2 weeks.",
|
||||
"metadata": {
|
||||
"category": "Effectory",
|
||||
"createdBy": null,
|
||||
"createdOn": null,
|
||||
"updatedBy": null,
|
||||
"updatedOn": null
|
||||
},
|
||||
"parameters": {
|
||||
"effect": {
|
||||
"type": "String",
|
||||
"metadata": {
|
||||
"displayName": "Effect",
|
||||
"description": "Enable or disable the execution of the policy"
|
||||
},
|
||||
"allowedValues": [
|
||||
"audit",
|
||||
"deny",
|
||||
"disabled"
|
||||
],
|
||||
"defaultValue": "audit"
|
||||
}
|
||||
},
|
||||
"policyRule": {
|
||||
"if": {
|
||||
"anyOf": [
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
"field": "type",
|
||||
"equals": "Microsoft.ServiceBus/namespaces/topics"
|
||||
},
|
||||
{
|
||||
"field": "Microsoft.ServiceBus/namespaces/topics/defaultMessageTimeToLive",
|
||||
"greater": "PW2"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
"field": "type",
|
||||
"equals": "Microsoft.ServiceBus/namespaces/topics/subscriptions"
|
||||
},
|
||||
{
|
||||
"field": "Microsoft.ServiceBus/namespaces/topics/subscriptions/defaultMessageTimeToLive",
|
||||
"greater": "PW2"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"effect": "[parameters('effect')]"
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": "/providers/Microsoft.Management/managementGroups/e9792fd7-4044-47e7-a40d-3fba46f1cd09/providers/Microsoft.Authorization/policyDefinitions/bab116a2-dffc-4740-9935-187dede2d2b0",
|
||||
"type": "Microsoft.Authorization/policyDefinitions",
|
||||
"name": "bab116a2-dffc-4740-9935-187dede2d2b0"
|
||||
}
|
||||
Reference in New Issue
Block a user