{
	"if": {
		"field": "type",
		"in": "[parameters('listOfResourceTypes')]"
	},
	"then": {
		"effect": "auditIfNotExists",
		"details": {
			"type": "Microsoft.Insights/diagnosticSettings",
			"existenceCondition": {
				"allOf": [
					{
						"field": "Microsoft.Insights/diagnosticSettings/logs.enabled",
						"equals": "true"
					},
					{
						"field": "Microsoft.Insights/diagnosticSettings/metrics.enabled",
						"equals": "true"
					}
				]
			}
		}
	}
}