diff --git a/.github/workflows/update-policy.yml b/.github/workflows/update-policy.yml index bc19a4595..56a6718d5 100644 --- a/.github/workflows/update-policy.yml +++ b/.github/workflows/update-policy.yml @@ -5,10 +5,16 @@ name: Update Library Templates on: schedule: - cron: "0 8 * * 1-5" - workflow_dispatch: {} + workflow_dispatch: + inputs: + enterprise-scale-repository-branch: + description: "The branch to target for the enterprise scale repository" + required: false + default: "main" env: remote_repository: "Azure/Enterprise-Scale" + remote_repository_branch: ${{ github.event.inputs.enterprise-scale-repository-branch != 'main' && github.event.inputs.enterprise-scale-repository-branch || 'main' }} branch_name: "patch-library-${{ github.run_number }}" pr_title: "Update Library Templates (automated)" pr_body: @@ -34,7 +40,7 @@ jobs: with: repository: ${{ env.remote_repository }} path: ${{ env.remote_repository }} - ref: main + ref: ${{ env.remote_repository_branch }} - uses: tibdex/github-app-token@v2 id: generate-token diff --git a/modules/archetypes/lib/policy_set_definitions/policy_set_definition_es_deny_publicpaasendpoints.tmpl.json b/modules/archetypes/lib/policy_set_definitions/policy_set_definition_es_deny_publicpaasendpoints.tmpl.json index d5eaae68f..9587da77c 100644 --- a/modules/archetypes/lib/policy_set_definitions/policy_set_definition_es_deny_publicpaasendpoints.tmpl.json +++ b/modules/archetypes/lib/policy_set_definitions/policy_set_definition_es_deny_publicpaasendpoints.tmpl.json @@ -8,7 +8,7 @@ "displayName": "Public network access should be disabled for PaaS services", "description": "This policy initiative is a group of policies that prevents creation of Azure PaaS services with exposed public endpoints", "metadata": { - "version": "5.0.0", + "version": "5.1.0", "category": "Network", "source": "https://github.com/Azure/Enterprise-Scale/", "alzCloudEnvironments": [ @@ -506,7 +506,7 @@ "Disabled" ] }, - "graphanaPublicNetworkAccess": { + "grafanaPublicNetworkAccess": { "type": "string", "defaultValue": "Deny", "allowedValues": [ @@ -958,11 +958,11 @@ "groupNames": [] }, { - "policyDefinitionReferenceId": "Deny-Graphana-PublicNetworkAccess", + "policyDefinitionReferenceId": "Deny-Grafana-PublicNetworkAccess", "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/e8775d5a-73b7-4977-a39b-833ef0114628", "parameters": { "effect": { - "value": "[parameters('graphanaPublicNetworkAccess')]" + "value": "[parameters('grafanaPublicNetworkAccess')]" } }, "groupNames": [] diff --git a/modules/archetypes/lib/policy_set_definitions/policy_set_definition_es_enforce_guardrails_containerinstance.tmpl.json b/modules/archetypes/lib/policy_set_definitions/policy_set_definition_es_enforce_guardrails_containerinstance.tmpl.json index 6ec4c7dac..0b1598cc7 100644 --- a/modules/archetypes/lib/policy_set_definitions/policy_set_definition_es_enforce_guardrails_containerinstance.tmpl.json +++ b/modules/archetypes/lib/policy_set_definitions/policy_set_definition_es_enforce_guardrails_containerinstance.tmpl.json @@ -28,16 +28,18 @@ ] } }, - "policyDefinitions": { - "policyDefinitionReferenceId": "Deny-ContainerInstance-Vnet", - "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/8af8f826-edcb-4178-b35f-851ea6fea615", - "parameters": { - "effect": { - "value": "[parameters('containerInstanceVnet')]" - } - }, - "groupNames": [] - }, + "policyDefinitions": [ + { + "policyDefinitionReferenceId": "Deny-ContainerInstance-Vnet", + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/8af8f826-edcb-4178-b35f-851ea6fea615", + "parameters": { + "effect": { + "value": "[parameters('containerInstanceVnet')]" + } + }, + "groupNames": [] + } + ], "policyDefinitionGroups": null } } \ No newline at end of file diff --git a/modules/archetypes/lib/policy_set_definitions/policy_set_definition_es_enforce_guardrails_postgresql.tmpl.json b/modules/archetypes/lib/policy_set_definitions/policy_set_definition_es_enforce_guardrails_postgresql.tmpl.json index 6c4efa8fe..6a7345101 100644 --- a/modules/archetypes/lib/policy_set_definitions/policy_set_definition_es_enforce_guardrails_postgresql.tmpl.json +++ b/modules/archetypes/lib/policy_set_definitions/policy_set_definition_es_enforce_guardrails_postgresql.tmpl.json @@ -27,16 +27,18 @@ ] } }, - "policyDefinitions": { - "policyDefinitionReferenceId": "Dine-PostgreSql-Adv-Threat-Protection", - "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/db048e65-913c-49f9-bb5f-1084184671d3", - "parameters": { - "effect": { - "value": "[parameters('postgreSqlAdvThreatProtection')]" - } - }, - "groupNames": [] - }, + "policyDefinitions": [ + { + "policyDefinitionReferenceId": "Dine-PostgreSql-Adv-Threat-Protection", + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/db048e65-913c-49f9-bb5f-1084184671d3", + "parameters": { + "effect": { + "value": "[parameters('postgreSqlAdvThreatProtection')]" + } + }, + "groupNames": [] + } + ], "policyDefinitionGroups": null } } \ No newline at end of file