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

feat: Pattern Module for Azure Update Manager #3771

Open
wants to merge 32 commits into
base: main
Choose a base branch
from

Conversation

akhilthomas011
Copy link

@akhilthomas011 akhilthomas011 commented Nov 12, 2024

Description

This PR adds the pattern module for Azure Update Manager.

The pattern creates multiple maintenance configurations and assigns them to ARC Servers/Azure VMs based on tags. The pattern also creates and assigns Azure Policies in the subscription to mandate maintenance configuration related Tags on Virtual machines on creation and do necessary config changes to be compatible with Azure Update Manager.

Closes #1144

Pipeline Reference

Pipeline
avm.ptn.maintenance.azure-update-manager

Type of Change

  • Update to CI Environment or utilities (Non-module affecting changes)
  • Azure Verified Module updates:
    • Bugfix containing backwards-compatible bug fixes, and I have NOT bumped the MAJOR or MINOR version in version.json:
      • Someone has opened a bug report issue, and I have included "Closes #{bug_report_issue_number}" in the PR description.
      • The bug was found by the module author, and no one has opened an issue to report it yet.
    • Feature update backwards compatible feature updates, and I have bumped the MINOR version in version.json.
    • Breaking changes and I have bumped the MAJOR version in version.json.
    • Update to documentation

Checklist

  • I'm sure there are no other open Pull Requests for the same update/change
  • I have run Set-AVMModule locally to generate the supporting module files.
  • My corresponding pipelines / checks run clean and green without any errors or warnings

@akhilthomas011 akhilthomas011 requested review from a team as code owners November 12, 2024 11:15
@avm-team-linter avm-team-linter bot added the Needs: Core Team 🧞 This item needs the AVM Core Team to review it label Nov 12, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Triage 🔍 Maintainers need to triage still Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue labels Nov 12, 2024
@akhilthomas011 akhilthomas011 changed the title Feat: Pattern Module for Azure Update Manager feat: Pattern Module for Azure Update Manager Nov 12, 2024
@jtracey93
Copy link
Contributor

Hey @akhilthomas011 ,

Firstly, thanks for your work on this PR!

We have made some changes to the AVM CI, detailed below, which means we need you to update your fork to pull in these latest changes and re-run your tests to show they still are passing prior to approving and merging this PR, as we don't and it fails once merged the publishing of your module will fail and will be blocked going forward until the test pass again via additional PRs.

Changes to CI That Have Been Made That You Need To Take Action On

Any questions reach out to the AVM Core Team by tagging us in your PR here or internally via Teams

Thanks

Jack (AVM Core Team)

@akhilthomas011
Copy link
Author

@jtracey93 - I have pulled-in the new changes to my PR. It passed the validations.

Comment on lines +4 to +5
metadata version = '0.1.0'
metadata category = 'Compute'
Copy link
Contributor

Choose a reason for hiding this comment

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

What's about this metadata?

//User Defined Types
@description('Defines the structure of a maintenance configuration.')
type maintenanceConfigurationType = {
@description('The name of the maintenance configuration.')
Copy link
Contributor

@AlexanderSehr AlexanderSehr Nov 24, 2024

Choose a reason for hiding this comment

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

Missing metadata like the prefix category Mandatory / Optional / Conditional for all properties

}
}
@description('The lock settings for the maintenance configuration.')
lock: object
Copy link
Contributor

Choose a reason for hiding this comment

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

For this you could import the lock type from the published avm-common-types module and use it here: lock: lockType?

@description('The tags to apply to the maintenance configuration.')
tags: object?
@description('The role assignments for the maintenance configuration.')
roleAssignments: array?
Copy link
Contributor

Choose a reason for hiding this comment

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

For this you could import the role assignments type from the published avm-common-types module and use it here: roleAssignments: roleAssignmentType[]?


@description('Optional. The name of the resource group to deploy for testing purposes.')
@maxLength(90)
// e.g., for a module 'network/private-endpoint' you could use 'dep-dev-network.privateendpoints-${serviceShort}-rg'
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove all example comments in this and other test files

Comment on lines +25 to +31
// ============ //
// Dependencies //
// ============ //

// General resources
// =================

Copy link
Contributor

Choose a reason for hiding this comment

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

akhilthomas011 and others added 6 commits November 27, 2024 13:22
Co-authored-by: Alexander Sehr <ASehr@hotmail.de>
Co-authored-by: Alexander Sehr <ASehr@hotmail.de>
…/main.test.bicep

Co-authored-by: Alexander Sehr <ASehr@hotmail.de>
…/main.test.bicep

Co-authored-by: Alexander Sehr <ASehr@hotmail.de>
…in.test.bicep

Co-authored-by: Alexander Sehr <ASehr@hotmail.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Core Team 🧞 This item needs the AVM Core Team to review it Needs: Triage 🔍 Maintainers need to triage still Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Module Proposal]: avm/ptn/maintenance/azure-update-manager
3 participants