{ "properties": { "displayName": "PolicyTagCreatedOnDate", "policyType": "Custom", "mode": "All", "description": "This policy add created date tags on resources when they don't exist.", "metadata": { "category": "Tags", "createdBy": "c6025a2e-416c-42da-96ef-dd507382793a", "createdOn": "2022-04-15T15:01:28.525335Z", "updatedBy": "c6025a2e-416c-42da-96ef-dd507382793a", "updatedOn": "2022-04-19T08:12:35.0545303Z" }, "parameters": {}, "policyRule": { "if": { "allOf": [ { "field": "tags['CreatedOnDate']", "exists": "false" } ] }, "then": { "effect": "modify", "details": { "roleDefinitionIds": [ "/providers/microsoft.authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c" ], "operations": [ { "operation": "add", "field": "tags['CreatedOnDate']", "value": "[utcNow()]" } ] } } } }, "id": "/providers/Microsoft.Management/managementGroups/e9792fd7-4044-47e7-a40d-3fba46f1cd09/providers/Microsoft.Authorization/policyDefinitions/7653268b-5004-4576-8946-5fd9d085e470", "type": "Microsoft.Authorization/policyDefinitions", "name": "7653268b-5004-4576-8946-5fd9d085e470", "systemData": { "createdBy": "jurjen.ladenius@effectory.com", "createdByType": "User", "createdAt": "2022-04-15T15:01:28.473525Z", "lastModifiedBy": "jurjen.ladenius@effectory.com", "lastModifiedByType": "User", "lastModifiedAt": "2022-04-19T08:12:35.0142798Z" } }