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

Deploy-VM-Backup optional parameters for exclusion tag #482

Merged
merged 3 commits into from
Mar 24, 2023
Merged

Deploy-VM-Backup optional parameters for exclusion tag #482

merged 3 commits into from
Mar 24, 2023

Conversation

stalejohnsen
Copy link
Contributor

@stalejohnsen stalejohnsen commented Mar 24, 2023

Overview/Summary

The ALZ default policy 'Deploy-VM-Backup' has the name 'Configure backup on virtual machines without a given tag to a new recovery services vault with a default policy'. In the current implementation of alzDefaultPolicyAssignments module it is not possible to set an exclusion tag as parameter, hence it is not possible to do what the policy name is describing as functionality.

This PR fixes/adds/changes/removes

  1. Adds two need parameters in alzDefaultPolicyAssignments.bicep
  2. Add optional blank parameters as example in alzDefaultPolicyAssignments.parameters.all.json
  3. Adds some more flexibility which is requested in 💡 Feature Request - Flexibility to exclude individual ALZ default policy assignments #481

Breaking Changes

No breaking changes, this is optional parameters

Testing Evidence

Id                      : /providers/Microsoft.Management/managementGroups/alz/
                          providers/Microsoft.Resources/deployments/alz-Default
                          PolicyAssignmentsDeployment-20230324T1003058531Z
DeploymentName          : alz-DefaultPolicyAssignmentsDeployment-20230324T10030
                          58531Z
ManagementGroupId       : alz
Location                : westeurope
ProvisioningState       : Succeeded
Timestamp               : 03/24/2023 10:27:51
Mode                    : Incremental
TemplateLink            : 
Parameters              : 
                          Name                                                 
                             Type                       Value     
                          =====================================================
                          =  =========================  ==========
                          parTopLevelManagementGroupPrefix                     
                             String                     "alz"     
                          parTopLevelManagementGroupSuffix                     
                             String                     ""        
                          parLogAnalyticsWorkSpaceAndAutomationAccountLocation 
                             String                     ""
                          parLogAnalyticsWorkspaceResourceId                   
                             String                     ""
                          parLogAnalyticsWorkspaceLogRetentionInDays           
                             String                     "30"      
                          parAutomationAccountName                             
                             String                     "alz-automation-account
"
                          parMsDefenderForCloudEmailSecurityContact            
                             String                     ""
                          parDdosProtectionPlanId                              
                             String                     ""        
                          parPrivateDnsResourceGroupId                         
                             String                     ""
                          parDisableAlzDefaultPolicies                         
                             Bool                       false     
                          parVmBackupExclusionTagName                        
                             String                     "Backup"  
                          parVmBackupExclusionTagValue                         
                             Array                      ["false"] 
                          parTelemetryOptOut                                   
                             Bool                       false     
                          
Outputs                 : 
DeploymentDebugLogLevel :

image

As part of this Pull Request I have

Adding optional parameters for Deploy-VM-Backup to exclude VMs with specific tag and value(s)
Adding new optional parameters for VM backup exclusions
@ghost ghost added the Needs: Triage 🔍 Needs triaging by the team label Mar 24, 2023
@jtracey93 jtracey93 added external community contribution and removed Needs: Triage 🔍 Needs triaging by the team labels Mar 24, 2023
Copy link
Contributor

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

Looking great @stalejohnsen, thanks for the contribution and effort here.

Can I ask that you manually generate the parameter docs updates and push the changes into your branch by following: https://github.com/Azure/ALZ-Bicep/wiki/Contributing#manually-generating-the-parameter-markdown-files

Thanks

Jack

@ghost ghost removed the Needs: Author Feedback label Mar 24, 2023
@jtracey93
Copy link
Contributor

/azp run validateazcloud

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

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

LGTM, will finish tests and then merge

@stalejohnsen
Copy link
Contributor Author

Looking great @stalejohnsen, thanks for the contribution and effort here.

Can I ask that you manually generate the parameter docs updates and push the changes into your branch by following: https://github.com/Azure/ALZ-Bicep/wiki/Contributing#manually-generating-the-parameter-markdown-files

Thanks

Jack

Updated Markdown generated for alzDefaultPolicyAssignments.bicep and included in this branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

💡 Feature Request - Flexibility to exclude individual ALZ default policy assignments
2 participants