Skip to content
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

Patch ESLZ ARM #727

Merged
merged 6 commits into from
Aug 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20173,7 +20173,7 @@
"Disabled"
],
"metadata": {
"displayName": "Cognitive Services accounts should enable data encryption with a customer-managed key(CMK)",
"displayName": "Cognitive Services accounts should enable data encryption with a customer-managed key (CMK)",
"description": "Customer-managed keys (CMK) are commonly required to meet regulatory compliance standards. CMKs enable the data stored in Cognitive Services to be encrypted with an Azure Key Vault key created and owned by you. You have full control and responsibility for the key lifecycle, including rotation and management. Learn more about CMK encryption at https://aka.ms/cosmosdb-cmk."
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are no longer using this template.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any harm in this fix?

},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20173,7 +20173,7 @@
"Disabled"
],
"metadata": {
"displayName": "Cognitive Services accounts should enable data encryption with a customer-managed key(CMK)",
"displayName": "Cognitive Services accounts should enable data encryption with a customer-managed key (CMK)",
"description": "Customer-managed keys (CMK) are commonly required to meet regulatory compliance standards. CMKs enable the data stored in Cognitive Services to be encrypted with an Azure Key Vault key created and owned by you. You have full control and responsibility for the key lifecycle, including rotation and management. Learn more about CMK encryption at https://aka.ms/cosmosdb-cmk."
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are no longer using this template.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any harm in this fix?

},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20173,7 +20173,7 @@
"Disabled"
],
"metadata": {
"displayName": "Cognitive Services accounts should enable data encryption with a customer-managed key(CMK)",
"displayName": "Cognitive Services accounts should enable data encryption with a customer-managed key (CMK)",
"description": "Customer-managed keys (CMK) are commonly required to meet regulatory compliance standards. CMKs enable the data stored in Cognitive Services to be encrypted with an Azure Key Vault key created and owned by you. You have full control and responsibility for the key lifecycle, including rotation and management. Learn more about CMK encryption at https://aka.ms/cosmosdb-cmk."
}
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are no longer using this template.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any harm in this fix?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No harm, but we are planning to delete these files so I don't see any reason to why we need to update them

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20173,7 +20173,7 @@
"Disabled"
],
"metadata": {
"displayName": "Cognitive Services accounts should enable data encryption with a customer-managed key(CMK)",
"displayName": "Cognitive Services accounts should enable data encryption with a customer-managed key (CMK)",
"description": "Customer-managed keys (CMK) are commonly required to meet regulatory compliance standards. CMKs enable the data stored in Cognitive Services to be encrypted with an Azure Key Vault key created and owned by you. You have full control and responsibility for the key lifecycle, including rotation and management. Learn more about CMK encryption at https://aka.ms/cosmosdb-cmk."
}
},
Expand Down
39 changes: 19 additions & 20 deletions eslzArm/eslzArm.json
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@
"managementManagementGroup": "[tenantResourceId('Microsoft.Management/managementGroups/', variables('mgmtGroups').management)]",
"connectivityManagementGroup": "[tenantResourceId('Microsoft.Management/managementGroups/', variables('mgmtGroups').connectivity)]",
"identityManagementGroup": "[tenantResourceId('Microsoft.Management/managementGroups/', variables('mgmtGroups').identity)]",
"lzsManaegmentGroup": "[tenantResourceId('Microsoft.Management/managementGroups/', variables('mgmtGroups').lzs)]",
"lzsManagementGroup": "[tenantResourceId('Microsoft.Management/managementGroups/', variables('mgmtGroups').lzs)]",
"corpManagementGroup": "[tenantResourceId('Microsoft.Management/managementGroups/', variables('mgmtGroups').corp)]",
"onlineManagementGroup": "[tenantResourceId('Microsoft.Management/managementGroups/', variables('mgmtGroups').online)]"
},
Expand All @@ -607,8 +607,7 @@
"ascConfigPolicyInitiative": "[uri(deployment().properties.templateLink.uri, 'managementGroupTemplates/policyAssignments/DINE-ASCConfigPolicyAssignment.json')]",
"azVmMonitorPolicyAssignment": "[uri(deployment().properties.templateLink.uri, 'managementGroupTemplates/policyAssignments/DINE-VMMonitoringPolicyAssignment.json')]",
"azVmssMonitorPolicyAssignment": "[uri(deployment().properties.templateLink.uri, 'managementGroupTemplates/policyAssignments/DINE-VMSSMonitoringPolicyAssignment.json')]",
"azBackupLzPolicyAssignment": "[uri(deployment().properties.templateLink.uri, 'managementGroupTemplates/policyAssignments/DINE-VMBackupPolicyAssignment.json')]",
"azBackupIdentityPolicyAssignment": "[uri(deployment().properties.templateLink.uri, 'managementGroupTemplates/policyAssignments/DINE-VMBackupPolicyAssignment.json')]",
"azVmBackupPolicyAssignment": "[uri(deployment().properties.templateLink.uri, 'managementGroupTemplates/policyAssignments/DINE-VMBackupPolicyAssignment.json')]",
"azPolicyForAksPolicyAssignment": "[uri(deployment().properties.templateLink.uri, 'managementGroupTemplates/policyAssignments/DINE-AksPolicyPolicyAssignment.json')]",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If identity subscription is enabled, we also recommend to assign VM Backup policy to the identity management group, hence we need a deterministic guid for the subsequent role assignment for that policy, so we need both these variables.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As azBackupIdentityPolicyAssignment isn't referenced anywhere else in the repository and the values are the same, how does this make a difference when an identity subscription is enabled?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is it's own (optional) deployment name, and we cannot have duplicated resource name in the same ARM template.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just my 2 cents here 😃

I have tested a deployment from @krowlandson's branch for this PR and it works 👍
image

Including the Backup policies involved also:
image

From my initial review, and re-review today, the ARM deployment names are unchanged just the reference to the deployment template URI and a de-duplication of a variable that holds this (which from looking at the current templates, it looks like the azBackupIdentityPolicyAssignment variable is not referenced anywhere as the azBackupLzPolicyAssignment is used for all nested deployments which do the assignments. Also as the conditionals are not based on these and other parameters/variables from the portal UX experience then I think this is all good 👍

"aksPrivEscalationPolicyAssignment": "[uri(deployment().properties.templateLink.uri, 'managementGroupTemplates/policyAssignments/DENY-AksPrivEscalationPolicyAssignment.json')]",
"aksPrivilegedPolicyAssignment": "[uri(deployment().properties.templateLink.uri, 'managementGroupTemplates/policyAssignments/DENY-AksPrivilegedPolicyAssignment.json')]",
Expand All @@ -624,7 +623,7 @@
"storageHttpsPolicyAssignment": "[uri(deployment().properties.templateLink.uri, 'managementGroupTemplates/policyAssignments/DENY-StorageWithoutHttpsPolicyAssignment.json')]",
"subnetNsgPolicyAssignment": "[uri(deployment().properties.templateLink.uri, 'managementGroupTemplates/policyAssignments/DENY-SubnetWithoutNsgPolicyAssignment.json')]",
"sqlAuditPolicyAssignment": "[uri(deployment().properties.templateLink.uri, 'managementGroupTemplates/policyAssignments/DINE-SQLAuditingPolicyAssignment.json')]",
"sqlEncryptionPolicyAssignment": "[uri(deployment().properties.templateLink.uri, 'managementGroupTemplates/policyAssignments/DINE-SQLAuditingPolicyAssignment.json')]",
"sqlEncryptionPolicyAssignment": "[uri(deployment().properties.templateLink.uri, 'managementGroupTemplates/policyAssignments/DINE-SQLEncryptionPolicyAssignment.json')]",
"ddosPolicyAssignment": "[uri(deployment().properties.templateLink.uri, 'managementGroupTemplates/policyAssignments/MODIFY-DDoSPolicyAssignment.json')]",
"corpVnetPeering": "[uri(deployment().properties.templateLink.uri, 'subscriptionTemplates/vnetPeering.json')]",
"corpVwanPeering": "[uri(deployment().properties.templateLink.uri, 'subscriptionTemplates/vnetPeeringVwan.json')]",
Expand Down Expand Up @@ -1919,7 +1918,7 @@
"type": "Microsoft.Resources/deployments",
"apiVersion": "2020-10-01",
"name": "[variables('deploymentNames').azBackupLzPolicyDeploymentName]",
"scope": "[variables('scopes').lzsManaegmentGroup]",
"scope": "[variables('scopes').lzsManagementGroup]",
"location": "[deployment().location]",
"dependsOn": [
"[resourceId('Microsoft.Resources/deployments', variables('deploymentNames').policyDeploymentName)]"
Expand All @@ -1928,7 +1927,7 @@
"mode": "Incremental",
"templateLink": {
"contentVersion": "1.0.0.0",
"uri": "[variables('deploymentUris').azBackupLzPolicyAssignment]"
"uri": "[variables('deploymentUris').azVmBackupPolicyAssignment]"
},
"parameters": {
"topLevelManagementGroupPrefix": {
Expand All @@ -1946,7 +1945,7 @@
"type": "Microsoft.Resources/deployments",
"apiVersion": "2020-10-01",
"name": "[variables('deploymentNames').ddosLzPolicyDeploymentName]",
"scope": "[variables('scopes').lzsManaegmentGroup]",
"scope": "[variables('scopes').lzsManagementGroup]",
"location": "[deployment().location]",
"dependsOn": [
"[resourceId('Microsoft.Resources/deployments', variables('deploymentNames').ddosDeploymentName)]"
Expand Down Expand Up @@ -1976,7 +1975,7 @@
"type": "Microsoft.Resources/deployments",
"apiVersion": "2020-10-01",
"name": "[variables('deploymentNames').azPolicyForAksPolicyDeploymentName]",
"scope": "[variables('scopes').lzsManaegmentGroup]",
"scope": "[variables('scopes').lzsManagementGroup]",
"location": "[deployment().location]",
"dependsOn": [
"[resourceId('Microsoft.Resources/deployments', variables('deploymentNames').policyDeploymentName)]"
Expand All @@ -2003,7 +2002,7 @@
"type": "Microsoft.Resources/deployments",
"apiVersion": "2020-10-01",
"name": "[variables('deploymentNames').aksPrivEscalationPolicyDeploymentName]",
"scope": "[variables('scopes').lzsManaegmentGroup]",
"scope": "[variables('scopes').lzsManagementGroup]",
"location": "[deployment().location]",
"dependsOn": [
"[resourceId('Microsoft.Resources/deployments', variables('deploymentNames').policyDeploymentName)]"
Expand All @@ -2027,7 +2026,7 @@
"type": "Microsoft.Resources/deployments",
"apiVersion": "2020-10-01",
"name": "[variables('deploymentNames').aksPrivilegedPolicyDeploymentName]",
"scope": "[variables('scopes').lzsManaegmentGroup]",
"scope": "[variables('scopes').lzsManagementGroup]",
"location": "[deployment().location]",
"dependsOn": [
"[resourceId('Microsoft.Resources/deployments', variables('deploymentNames').policyDeploymentName)]"
Expand All @@ -2051,7 +2050,7 @@
"type": "Microsoft.Resources/deployments",
"apiVersion": "2020-10-01",
"name": "[variables('deploymentNames').aksHttpsPolicyDeploymentName]",
"scope": "[variables('scopes').lzsManaegmentGroup]",
"scope": "[variables('scopes').lzsManagementGroup]",
"location": "[deployment().location]",
"dependsOn": [
"[resourceId('Microsoft.Resources/deployments', variables('deploymentNames').policyDeploymentName)]"
Expand All @@ -2075,7 +2074,7 @@
"type": "Microsoft.Resources/deployments",
"apiVersion": "2020-10-01",
"name": "[variables('deploymentNames').tlsSslPolicyDeploymentName]",
"scope": "[variables('scopes').lzsManaegmentGroup]",
"scope": "[variables('scopes').lzsManagementGroup]",
"location": "[deployment().location]",
"dependsOn": [
"[resourceId('Microsoft.Resources/deployments', variables('deploymentNames').policyDeploymentName)]",
Expand Down Expand Up @@ -2103,7 +2102,7 @@
"type": "Microsoft.Resources/deployments",
"apiVersion": "2020-10-01",
"name": "[variables('deploymentNames').ipFwPolicyDeploymentName]",
"scope": "[variables('scopes').lzsManaegmentGroup]",
"scope": "[variables('scopes').lzsManagementGroup]",
"location": "[deployment().location]",
"dependsOn": [
"[resourceId('Microsoft.Resources/deployments', variables('deploymentNames').policyDeploymentName)]",
Expand Down Expand Up @@ -2156,7 +2155,7 @@
"type": "Microsoft.Resources/deployments",
"apiVersion": "2020-10-01",
"name": "[variables('deploymentNames').rdpFromInternetPolicyDeploymentName]",
"scope": "[variables('scopes').lzsManaegmentGroup]",
"scope": "[variables('scopes').lzsManagementGroup]",
"location": "[deployment().location]",
"dependsOn": [
"[resourceId('Microsoft.Resources/deployments', variables('deploymentNames').policyDeploymentName)]",
Expand Down Expand Up @@ -2184,7 +2183,7 @@
"type": "Microsoft.Resources/deployments",
"apiVersion": "2020-10-01",
"name": "[variables('deploymentNames').storageHttpsPolicyDeploymentName]",
"scope": "[variables('scopes').lzsManaegmentGroup]",
"scope": "[variables('scopes').lzsManagementGroup]",
"location": "[deployment().location]",
"dependsOn": [
"[resourceId('Microsoft.Resources/deployments', variables('deploymentNames').policyDeploymentName)]",
Expand All @@ -2209,7 +2208,7 @@
"type": "Microsoft.Resources/deployments",
"apiVersion": "2020-10-01",
"name": "[variables('deploymentNames').subnetNsgPolicyDeploymentName]",
"scope": "[variables('scopes').lzsManaegmentGroup]",
"scope": "[variables('scopes').lzsManagementGroup]",
"location": "[deployment().location]",
"dependsOn": [
"[resourceId('Microsoft.Resources/deployments', variables('deploymentNames').policyDeploymentName)]",
Expand Down Expand Up @@ -2237,7 +2236,7 @@
"type": "Microsoft.Resources/deployments",
"apiVersion": "2020-10-01",
"name": "[variables('deploymentNames').sqlAuditPolicyDeploymentName]",
"scope": "[variables('scopes').lzsManaegmentGroup]",
"scope": "[variables('scopes').lzsManagementGroup]",
"location": "[deployment().location]",
"dependsOn": [
"[resourceId('Microsoft.Resources/deployments', variables('deploymentNames').policyDeploymentName)]"
Expand All @@ -2264,7 +2263,7 @@
"type": "Microsoft.Resources/deployments",
"apiVersion": "2020-10-01",
"name": "[variables('deploymentNames').sqlEncryptionPolicyDeploymentName]",
"scope": "[variables('scopes').lzsManaegmentGroup]",
"scope": "[variables('scopes').lzsManagementGroup]",
"location": "[deployment().location]",
"dependsOn": [
"[resourceId('Microsoft.Resources/deployments', variables('deploymentNames').policyDeploymentName)]"
Expand Down Expand Up @@ -2303,7 +2302,7 @@
"mode": "Incremental",
"templateLink": {
"contentVersion": "1.0.0.0",
"uri": "[variables('deploymentUris').azBackupLzPolicyAssignment]"
"uri": "[variables('deploymentUris').azVmBackupPolicyAssignment]"
},
"parameters": {
"topLevelManagementGroupPrefix": {
Expand Down Expand Up @@ -3320,7 +3319,7 @@
"mode": "Incremental",
"templateLink": {
"contentVersion": "1.0.0.0",
"uri": "[variables('deploymentUris').azBackupLzPolicyAssignment]"
"uri": "[variables('deploymentUris').azVmBackupPolicyAssignment]"
},
"parameters": {
"topLevelManagementGroupPrefix": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"policyAssignmentNames": {
"denySubnetWithoutNsg": "Deny-Subnet-Without-Nsg",
"description": "This policy denies the creation of a subsnet with out an Network Security Group. NSG help to protect traffic across subnet-level.",
"description": "This policy denies the creation of a subnet without a Network Security Group to protect traffic across subnets.",
"displayName": "Subnets should have a Network Security Group"
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16281,7 +16281,7 @@
"Disabled"
],
"metadata": {
"displayName": "Cognitive Services accounts should enable data encryption with a customer-managed key(CMK)",
"displayName": "Cognitive Services accounts should enable data encryption with a customer-managed key (CMK)",
"description": "Customer-managed keys (CMK) are commonly required to meet regulatory compliance standards. CMKs enable the data stored in Cognitive Services to be encrypted with an Azure Key Vault key created and owned by you. You have full control and responsibility for the key lifecycle, including rotation and management. Learn more about CMK encryption at https://aka.ms/cosmosdb-cmk."
}
},
Expand Down