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

Patch ESLZ ARM #727

merged 6 commits into from
Aug 11, 2021

Conversation

krowlandson
Copy link
Contributor

@krowlandson krowlandson commented Aug 4, 2021

Overview/Summary

Minor updates to the ESLZ ARM templates to fix a few issues observed during development of the Terraform Module.

This PR fixes/adds/changes/removes

  1. Fix naming for lzsManagementGroup variable
  2. Fix value for sqlEncryptionPolicyAssignment variable
  3. Update name for the following policies to improve clarity on purpose:
    1. Deny-Priv-Esc-AKS --> Deny-Priv-Escalation-AKS
    2. Deny-Privileged-AKS --> Deny-Priv-Containers-AKS
  4. Update description for Deny-Subnet-Without-Nsg Policy Assignment
  5. Update metadata.displayName for CognitiveServicesCMKEffect parameter in Enforce-Encryption-CMK Policy Set Definition to remove unusual whitespace character (discovered during testing, as per the below image)

image

Breaking Changes

n/a

Testing Evidence

These changes replicate values set in a working deployment using the Terraform version of ES.

For the update on Enforce-Encryption-CMK, please see the below evidence of how this change effects the resource in question:

image

As part of this Pull Request I have

  • Checked for duplicate Pull Requests
  • Associated it with relevant issues, for tracking and closure.
  • Ensured my code/branch is up-to-date with the latest changes in the main branch
  • Performed testing and provided evidence.
  • Updated relevant and associated documentation.
  • Updated the "What's New?" wiki page (located: /docs/wiki/whats-new.md)

Kevin Rowlandson added 3 commits August 4, 2021 12:06
@krowlandson krowlandson added the bug Something isn't working label Aug 4, 2021
@krowlandson krowlandson requested a review from krnese August 4, 2021 11:46
@krowlandson krowlandson self-assigned this Aug 4, 2021
@krowlandson
Copy link
Contributor Author

I don't believe there are any specific updates needed on the "What's new" page as these are all covered under the existing descriptions, but please let me know if you think it needs an addition.

jtracey93
jtracey93 previously approved these changes Aug 4, 2021
Copy link
Collaborator

@jtracey93 jtracey93 left a comment

Choose a reason for hiding this comment

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

All looks good to me @krowlandson!

Just a couple of questions/notes:

  1. Did you also change the Azure Backup Policy Assignment variable as the azBackupIdentityPolicyAssignment variable was never used?
  2. You dont need to update the RIs in the docs/reference/xxxx/ folders now for Adventure Works, Contoso, WingTip & Trey separately anymore; only the files in eslzArm/ 👍

@@ -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?

@@ -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?

@@ -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

@@ -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 👍

@krnese krnese merged commit 1b79b70 into Azure:main Aug 11, 2021
@krowlandson krowlandson deleted the patch-eslzArm branch August 14, 2022 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants