-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New generic policy for PaaS resources private endpoint to override Private DNS zone. #1618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
cb7c68c
Create Deploy-Private DNS zone-PaaS-Private endpoint.json
Ravivarman13 61740f6
Create Deploy-Private DNS zone-PaaS-Private endpoint-Allowed values.json
Ravivarman13 6b5f0d2
Merge branch 'policy-refresh-q3fy24' into main
Springstone f9dd4fb
Update and rename Deploy-Private DNS zone-PaaS-Private endpoint-Allow…
Ravivarman13 163a4fa
Update and rename Deploy-Private DNS zone-PaaS-Private endpoint.json …
Ravivarman13 18c23c7
Update Whats-new.md
Ravivarman13 84c9af7
Update and rename Deploy-Private DNS zone ID-PaaS-PE.json to Deploy-P…
Ravivarman13 137c9d7
Update and rename Deploy-Private DNS zone-PaaS-PE-Generic.json to Dep…
Ravivarman13 501c795
Update Deploy-Private-DNS-zone-ID-PaaS-PE.json
Ravivarman13 9916128
Update Deploy-Private-DNS-zone-PaaS-PE-Generic.json
Ravivarman13 f5f0d59
Update policies.bicep
Ravivarman13 e35159f
Update Deploy-Private-DNS-zone-ID-PaaS-PE.json
Ravivarman13 31cbaf5
Auto-update Portal experience [Springstone/651f57a7]
github-actions[bot] b519233
Update Deploy-Private-DNS-zone-ID-PaaS-PE.json
Ravivarman13 3222694
Auto-update Portal experience [Ravivarman13/651f57a7]
github-actions[bot] 00d2353
Update Deploy-Private-DNS-zone-PaaS-PE-Generic.json
Ravivarman13 cf32b6d
Auto-update Portal experience [Ravivarman13/651f57a7]
github-actions[bot] 5e2f612
Update and rename Deploy-Private-DNS-zone-ID-PaaS-PE.json to Deploy-P…
Ravivarman13 4095626
Update and rename Deploy-Private-DNS-zone-PaaS-PE-Generic.json to Dep…
Ravivarman13 cab3551
Update Whats-new.md
Ravivarman13 31526a1
Update policies.bicep
Ravivarman13 817a0dd
Auto-update Portal experience [Ravivarman13/651f57a7]
github-actions[bot] 9f661a4
Apply suggestions from JT code review
jtracey93 166cd1b
Auto-update Portal experience [jtracey93/b646a5d5]
github-actions[bot] 92b61bb
Update Whats-new.md
Ravivarman13 0f69d16
Update policies.bicep
Ravivarman13 4b6ef7c
Auto-update Portal experience [Ravivarman13/b646a5d5]
github-actions[bot] c1d87a0
Delete src/resources/Microsoft.Authorization/policyDefinitions/Deploy…
Ravivarman13 d26ffb8
Merge branch 'policy-refresh-q3fy24' of https://github.com/Azure/Ente…
Ravivarman13 c408761
Auto-update Portal experience [Ravivarman13/79c74f4d]
github-actions[bot] c9defbd
Merge branch 'policy-refresh-q3fy24' of https://github.com/Azure/Ente…
Ravivarman13 092195b
Auto-update Portal experience [Ravivarman13/21908c03]
github-actions[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
233 changes: 233 additions & 0 deletions
233
...ation/policyDefinitions/Deploy-Private DNS zone-PaaS-Private endpoint-Allowed values.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,233 @@ | ||
| { | ||
| "name": "Configure a private DNS Zone ID for Paas services-Generic policy for PaaS services dosent has builtin policies", | ||
| "type": "Microsoft.Authorization/policyDefinitions", | ||
| "apiVersion": "2021-06-01", | ||
| "scope": null, | ||
| "properties": { | ||
| "policyType": "Custom", | ||
| "mode": "All", | ||
| "displayName": "Configure a private DNS Zone ID for Paas services-Generic policy for PaaS services dosent has builtin policies", | ||
| "description": "Configure private DNS zone group to override the DNS resolution for PaaS services private endpoint", | ||
| "metadata": { | ||
| "version": "1.1.0", | ||
Springstone marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "category": "Generic", | ||
Springstone marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "source": "https://github.com/Azure/Enterprise-Scale/", | ||
| "alzCloudEnvironments": [ | ||
| "AzureCloud" | ||
| ] | ||
| }, | ||
| "parameters": { | ||
| "effect": { | ||
| "type": "String", | ||
| "metadata": { | ||
| "displayName": "Effect", | ||
| "description": "Enable or disable the execution of the policy" | ||
| }, | ||
Springstone marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "allowedValues": [ | ||
| "DeployIfNotExists", | ||
| "Disabled" | ||
| ], | ||
| "defaultValue": "DeployIfNotExists" | ||
| }, | ||
| "privateDnsZoneId": { | ||
| "type": "String", | ||
| "metadata": { | ||
| "displayName": "Private DNS Zone ID for Paas services", | ||
Springstone marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "description": "The private DNS zone name required for specific Paas Services to resolve a private DNS Zone.", | ||
| "strongType": "Microsoft.Network/privateDnsZones", | ||
| "assignPermissions": true | ||
| } | ||
| }, | ||
| "ResourceType": { | ||
| "type": "String", | ||
| "metadata": { | ||
| "displayName": "PaaS private endpoint resource type", | ||
| "description": "The PaaS service endpoint resource type." | ||
| }, | ||
| "allowedValues": [ | ||
| "Microsoft.CognitiveServices/accounts", | ||
| "Microsoft.BotService/botServices", | ||
| "Microsoft.Synapse/privateLinkHubs", | ||
| "Microsoft.EventHub/namespaces", | ||
| "Microsoft.ServiceBus/namespaces", | ||
| "Microsoft.DataFactory/factories", | ||
| "Microsoft.Kusto/Clusters", | ||
| "Microsoft.PowerBI/privateLinkServicesForPowerBI", | ||
| "Microsoft.Databricks/workspaces", | ||
| "Microsoft.Batch/batchAccounts", | ||
| "Microsoft.DesktopVirtualization/workspaces", | ||
| "Microsoft.DesktopVirtualization/hostpools", | ||
| "Microsoft.ContainerService/managedClusters", | ||
| "Microsoft.ContainerRegistry/registries", | ||
| "Microsoft.Sql/servers", | ||
| "Microsoft.Sql/managedInstances", | ||
| "Microsoft.DocumentDB/databaseAccounts", | ||
| "Microsoft.DBforPostgreSQL/serverGroupsv2", | ||
| "Microsoft.DBforPostgreSQL/servers", | ||
| "Microsoft.DBforMySQL/servers", | ||
| "Microsoft.DBforMySQL/flexibleServers", | ||
| "Microsoft.DBforMariaDB/servers", | ||
| "Microsoft.Cache/RedisEnterprise", | ||
| "Microsoft.EventGrid/partnerNamespaces", | ||
| "Microsoft.ApiManagement/service", | ||
| "Microsoft.HealthcareApis/workspaces", | ||
| "Microsoft.Devices/ProvisioningServices", | ||
| "Microsoft.DeviceUpdate/accounts", | ||
| "Microsoft.IoTCentral/IoTApps", | ||
| "Microsoft.DigitalTwins/digitalTwinsInstances", | ||
| "Microsoft.RecoveryServices/vaults", | ||
| "Microsoft.Purview/accounts", | ||
| "Microsoft.Authorization/resourceManagementPrivateLinks", | ||
| "Microsoft.Dashboard/grafana", | ||
| "Microsoft.KeyVault/managedHSMs", | ||
| "Microsoft.AppConfiguration/configurationStores", | ||
| "Microsoft.Attestation/attestationProviders", | ||
| "Microsoft.Storage/storageAccounts", | ||
| "Microsoft.StorageSync/storageSyncServices", | ||
| "Microsoft.Compute/diskAccesses", | ||
| "Microsoft.Search/searchServices", | ||
| "Microsoft.Relay/namespaces" | ||
| ] | ||
| }, | ||
| "groupId": { | ||
| "type": "String", | ||
| "metadata": { | ||
| "displayName": "PaaS Private endpoint group ID", | ||
| "description": "The group ID of the PaaS private endpoint." | ||
| }, | ||
| "allowedValues": [ | ||
| "Account", | ||
| "Bot", | ||
| "Token", | ||
| "Web", | ||
| "namespace", | ||
| "dataFactory", | ||
| "portal", | ||
| "cluster", | ||
| "tenant", | ||
| "databricks_ui_api", | ||
| "browser_authentication", | ||
| "nodeManagement", | ||
| "global", | ||
| "feed", | ||
| "connection", | ||
| "management", | ||
| "registry", | ||
| "sqlServer", | ||
| "managedInstance", | ||
| "Analytical", | ||
| "coordinator", | ||
| "postgresqlServer", | ||
| "mysqlServer", | ||
| "mariadbServer", | ||
| "redisEnterprise", | ||
| "partnernamespace", | ||
| "gateway", | ||
| "healthcareworkspace", | ||
| "iotDps", | ||
| "DeviceUpdate", | ||
| "iotApp", | ||
| "API", | ||
| "AzureBackup", | ||
| "account", | ||
| "ResourceManagement", | ||
| "grafana", | ||
| "managedhsm", | ||
| "configurationStores", | ||
| "standard", | ||
| "table", | ||
| "table_secondary", | ||
| "afs", | ||
| "disks", | ||
| "searchService" | ||
| ] | ||
| }, | ||
| "policyRule": { | ||
| "if": { | ||
| "allOf": [ | ||
| { | ||
| "field": "type", | ||
| "equals": "Microsoft.Network/privateEndpoints" | ||
| }, | ||
| { | ||
| "count": { | ||
| "field": "Microsoft.Network/privateEndpoints/privateLinkServiceConnections[*]", | ||
| "where": { | ||
| "allOf": [ | ||
| { | ||
| "field": "Microsoft.Network/privateEndpoints/privateLinkServiceConnections[*].privateLinkServiceId", | ||
| "contains": "[parameters('ResourceType')]" | ||
| }, | ||
| { | ||
| "field": "Microsoft.Network/privateEndpoints/privateLinkServiceConnections[*].groupIds[*]", | ||
| "equals": "[parameters('groupId')]" | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "greaterOrEquals": 1 | ||
| } | ||
| ] | ||
| }, | ||
| "then": { | ||
| "effect": "[parameters('effect')]", | ||
| "details": { | ||
| "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups", | ||
| "roleDefinitionIds": [ | ||
| "/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7" | ||
| ], | ||
| "deployment": { | ||
| "properties": { | ||
| "mode": "incremental", | ||
| "template": { | ||
| "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | ||
| "contentVersion": "1.0.0.0", | ||
| "parameters": { | ||
| "privateDnsZoneId": { | ||
| "type": "string" | ||
| }, | ||
| "privateEndpointName": { | ||
| "type": "string" | ||
| }, | ||
| "location": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "resources": [ | ||
| { | ||
| "name": "[concat(parameters('privateEndpointName'), '/deployedByPolicy')]", | ||
| "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups", | ||
| "apiVersion": "2020-03-01", | ||
| "location": "[parameters('location')]", | ||
| "properties": { | ||
| "privateDnsZoneConfigs": [ | ||
| { | ||
| "name": "PaasService-privateDnsZone", | ||
| "properties": { | ||
| "privateDnsZoneId": "[parameters('privateDnsZoneId')]" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| ] | ||
| }, | ||
| "parameters": { | ||
| "privateDnsZoneId": { | ||
| "value": "[parameters('privateDnsZoneId')]" | ||
| }, | ||
| "privateEndpointName": { | ||
| "value": "[field('name')]" | ||
| }, | ||
| "location": { | ||
| "value": "[field('location')]" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
143 changes: 143 additions & 0 deletions
143
...rosoft.Authorization/policyDefinitions/Deploy-Private DNS zone-PaaS-Private endpoint.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,143 @@ | ||
| { | ||
| "name": "Configure a private DNS Zone ID for Paas services-Generic policy", | ||
Springstone marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "type": "Microsoft.Authorization/policyDefinitions", | ||
| "apiVersion": "2021-06-01", | ||
| "scope": null, | ||
| "properties": { | ||
| "policyType": "Custom", | ||
| "mode": "All", | ||
| "displayName": "Configure a private DNS Zone ID for Paas services-Generic policy", | ||
| "description": "Configure private DNS zone group to override the DNS resolution for PaaS services private endpoint", | ||
| "metadata": { | ||
| "version": "1.1.0", | ||
Springstone marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "category": "Generic", | ||
| "source": "https://github.com/Azure/Enterprise-Scale/", | ||
| "alzCloudEnvironments": [ | ||
| "AzureCloud" | ||
| ] | ||
| }, | ||
| "parameters": { | ||
| "effect": { | ||
| "type": "String", | ||
| "metadata": { | ||
| "displayName": "Effect", | ||
Springstone marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "description": "Enable or disable the execution of the policy" | ||
| }, | ||
| "allowedValues": [ | ||
| "DeployIfNotExists", | ||
| "Disabled" | ||
| ], | ||
| "defaultValue": "DeployIfNotExists" | ||
| }, | ||
| "privateDnsZoneId": { | ||
| "type": "String", | ||
| "metadata": { | ||
| "displayName": "Private DNS Zone ID for Paas services", | ||
Springstone marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "description": "The private DNS zone name required for specific Paas Services to resolve a private DNS Zone.", | ||
| "strongType": "Microsoft.Network/privateDnsZones", | ||
| "assignPermissions": true | ||
| } | ||
| }, | ||
| "ResourceType": { | ||
| "type": "String", | ||
| "metadata": { | ||
| "displayName": "PaaS private endpoint resource type", | ||
| "description": "The PaaS endpoint resource type." | ||
| } | ||
| }, | ||
| "groupId": { | ||
| "type": "String", | ||
| "metadata": { | ||
| "displayName": "PaaS Private endpoint group ID", | ||
| "description": "The group ID of the PaaS private endpoint." | ||
| } | ||
| }, | ||
| "policyRule": { | ||
| "if": { | ||
| "allOf": [ | ||
| { | ||
| "field": "type", | ||
| "equals": "Microsoft.Network/privateEndpoints" | ||
| }, | ||
| { | ||
| "count": { | ||
| "field": "Microsoft.Network/privateEndpoints/privateLinkServiceConnections[*]", | ||
| "where": { | ||
| "allOf": [ | ||
| { | ||
| "field": "Microsoft.Network/privateEndpoints/privateLinkServiceConnections[*].privateLinkServiceId", | ||
| "contains": "[parameters('ResourceType')]" | ||
| }, | ||
| { | ||
| "field": "Microsoft.Network/privateEndpoints/privateLinkServiceConnections[*].groupIds[*]", | ||
| "equals": "[parameters('groupId')]" | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "greaterOrEquals": 1 | ||
| } | ||
| ] | ||
| }, | ||
| "then": { | ||
| "effect": "[parameters('effect')]", | ||
| "details": { | ||
| "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups", | ||
| "roleDefinitionIds": [ | ||
| "/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7" | ||
| ], | ||
| "deployment": { | ||
| "properties": { | ||
| "mode": "incremental", | ||
| "template": { | ||
| "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | ||
| "contentVersion": "1.0.0.0", | ||
| "parameters": { | ||
| "privateDnsZoneId": { | ||
| "type": "string" | ||
| }, | ||
| "privateEndpointName": { | ||
| "type": "string" | ||
| }, | ||
| "location": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "resources": [ | ||
| { | ||
| "name": "[concat(parameters('privateEndpointName'), '/deployedByPolicy')]", | ||
| "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups", | ||
| "apiVersion": "2020-03-01", | ||
| "location": "[parameters('location')]", | ||
| "properties": { | ||
| "privateDnsZoneConfigs": [ | ||
| { | ||
| "name": "PaasService-privateDnsZone", | ||
| "properties": { | ||
| "privateDnsZoneId": "[parameters('privateDnsZoneId')]" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| ] | ||
| }, | ||
| "parameters": { | ||
| "privateDnsZoneId": { | ||
| "value": "[parameters('privateDnsZoneId')]" | ||
| }, | ||
| "privateEndpointName": { | ||
| "value": "[field('name')]" | ||
| }, | ||
| "location": { | ||
| "value": "[field('location')]" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.