Skip to content

Commit

Permalink
feat: New module avm/res/azure-stack-hci/cluster module (#4417)
Browse files Browse the repository at this point in the history
## Description

Adds new Azure Stack HCI Cluster AVM module.

Some helper modules for e2e testing are placed here
`avm\utilities\e2e-template-assets\templates\azure-stack-hci`, which
will also be using them for other HCI resource modules (always needing
to deploy an HCI cluster in Azure to test on). If this is not the right
location for this sort of shared asset, please let us know.

For some reason Set-AVMModule does not generate cross-ref correctly on
my dev machine, it is manually added back to pass the static validation.

## Pipeline Reference

<!-- Insert your Pipeline Status Badge below -->

| Pipeline |
| -------- |
|
[![avm.res.azure-stack-hci.cluster](https://github.com/Infrastructure-as-code-Automation/bicep-registry-modules/actions/workflows/avm.res.azure-stack-hci.cluster.yml/badge.svg?branch=user%2FDanteMustCode%2Fhci-cs)](https://github.com/Infrastructure-as-code-Automation/bicep-registry-modules/actions/workflows/avm.res.azure-stack-hci.cluster.yml)
|

## Type of Change

- [ ] Update to CI Environment or utilities (Non-module affecting
changes)
- [x] 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

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

As agreed offline, [the existing draft pull
request](#4155) by
@AlexanderSehr and [the previous pull
request](#3364) by
@mbrat2005 will be superseded by this. Special thanks to their
contribution to this pull request.

## Maintainer checklist:
* [ ] Microsoft.AzureStackHCI RP registered (in order to grant
permissions before starting)
* [ ] Service Principal created and granted Azure Resource Bridge
Deployment role on the management group (deployment will create
subscription-level permissions, but parallel deployments/failures may
clean up the required role). Create a secret credential.
* [ ]  CI-arbDeploymentAppId
* [ ]  CI-arbDeploymentSPObjectId (from Enterprise Application)
* [ ]  CI-arbDeploymentServicePrincipalSecret
* [ ] CI-hciResourceProviderObjectId (Get-AzADServicePrincipal
-ApplicationId 1412d89f-b8a8-4111-b4fd-e82905cbd85d)

---------

Co-authored-by: Matthew Bratschun <[email protected]>
Co-authored-by: Matthew Bratschun <[email protected]>
Co-authored-by: Alexander Sehr <[email protected]>
Co-authored-by: Hangyu Xu <[email protected]>
  • Loading branch information
5 people authored Feb 12, 2025
1 parent 20a2949 commit eb456ce
Show file tree
Hide file tree
Showing 28 changed files with 7,480 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
/avm/res/app/managed-environment/ @Azure/avm-res-app-managedenvironment-module-owners-bicep @Azure/avm-module-reviewers-bicep
/avm/res/app-configuration/configuration-store/ @Azure/avm-res-appconfiguration-configurationstore-module-owners-bicep @Azure/avm-module-reviewers-bicep
/avm/res/automation/automation-account/ @Azure/avm-res-automation-automationaccount-module-owners-bicep @Azure/avm-module-reviewers-bicep
/avm/res/azure-stack-hci/cluster/ @Azure/avm-res-azurestackhci-cluster-module-owners-bicep @Azure/avm-module-reviewers-bicep
/avm/res/batch/batch-account/ @Azure/avm-res-batch-batchaccount-module-owners-bicep @Azure/avm-module-reviewers-bicep
/avm/res/cache/redis/ @Azure/avm-res-cache-redis-module-owners-bicep @Azure/avm-module-reviewers-bicep
/avm/res/cdn/profile/ @Azure/avm-res-cdn-profile-module-owners-bicep @Azure/avm-module-reviewers-bicep
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/avm_module_issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ body:
- "avm/res/app/job"
- "avm/res/app/managed-environment"
- "avm/res/automation/automation-account"
- "avm/res/azure-stack-hci/cluster"
- "avm/res/batch/batch-account"
- "avm/res/cache/redis"
- "avm/res/cdn/profile"
Expand Down
88 changes: 88 additions & 0 deletions .github/workflows/avm.res.azure-stack-hci.cluster.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: "avm.res.azure-stack-hci.cluster"

on:
workflow_dispatch:
inputs:
staticValidation:
type: boolean
description: "Execute static validation"
required: false
default: true
deploymentValidation:
type: boolean
description: "Execute deployment validation"
required: false
default: true
removeDeployment:
type: boolean
description: "Remove deployed module"
required: false
default: true
customLocation:
type: string
description: "Default location overwrite (e.g., eastus)"
required: false
push:
branches:
- main
paths:
- ".github/actions/templates/avm-**"
- ".github/workflows/avm.template.module.yml"
- ".github/workflows/avm.res.azure-stack-hci.cluster.yml"
- "avm/res/azure-stack-hci/cluster/**"
- "avm/utilities/pipelines/**"
- "!avm/utilities/pipelines/platform/**"
- "!*/**/README.md"

env:
modulePath: "avm/res/azure-stack-hci/cluster"
workflowPath: ".github/workflows/avm.res.azure-stack-hci.cluster.yml"

concurrency:
group: ${{ github.workflow }}

jobs:
###########################
# Initialize pipeline #
###########################
job_initialize_pipeline:
runs-on: ubuntu-latest
name: "Initialize pipeline"
steps:
- name: "Checkout"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Set input parameters to output variables"
id: get-workflow-param
uses: ./.github/actions/templates/avm-getWorkflowInput
with:
workflowPath: "${{ env.workflowPath}}"
- name: "Get module test file paths"
id: get-module-test-file-paths
uses: ./.github/actions/templates/avm-getModuleTestFiles
with:
modulePath: "${{ env.modulePath }}"
outputs:
workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }}
moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }}
psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }}
modulePath: "${{ env.modulePath }}"

##############################
# Call reusable workflow #
##############################
call-workflow-passing-data:
name: "Run"
permissions:
id-token: write # For OIDC
contents: write # For release tags
needs:
- job_initialize_pipeline
uses: ./.github/workflows/avm.template.module.yml
with:
workflowInput: "${{ needs.job_initialize_pipeline.outputs.workflowInput }}"
moduleTestFilePaths: "${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}"
psRuleModuleTestFilePaths: "${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}"
modulePath: "${{ needs.job_initialize_pipeline.outputs.modulePath}}"
secrets: inherit
Loading

0 comments on commit eb456ce

Please sign in to comment.