Skip to content

Commit

Permalink
Merge pull request #11 from Azure/main
Browse files Browse the repository at this point in the history
fetching latest
  • Loading branch information
sebassem authored Mar 7, 2024
2 parents 7535855 + efdaf7b commit 7a235ba
Show file tree
Hide file tree
Showing 1,603 changed files with 287,905 additions and 8,493 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"features": {
"azure-cli": "latest",
"dotnet": "7.0",
"ghcr.io/devcontainers/features/node:1": "none"
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers/features/powershell:1": {}
}
}
146 changes: 73 additions & 73 deletions .github/CODEOWNERS

Large diffs are not rendered by default.

74 changes: 34 additions & 40 deletions .github/ISSUE_TEMPLATE/avm_module_issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,17 @@ body:
description: Which existing AVM module is this issue related to?
options:
- "Other, as defined below..."
- "avm/res/aad/domain-service"
# - "avm/ptn/avd-lza/insights"
# - "avm/ptn/avd-lza/management-plane"
# - "avm/ptn/avd-lza/networking"
# - "avm/ptn/avd-lza/session-hosts"
# - "avm/ptn/security/security-center"
# - "avm/res/aad/domain-service"
- "avm/res/analysis-services/server"
- "avm/res/api-management/service"
# - "avm/res/app-configuration/configuration-store"
- "avm/res/app/container-app"
- "avm/res/app/managed-environment"
- "avm/res/app-configuration/configuration-store"
- "avm/res/authorization/lock"
- "avm/res/authorization/policy-assignment"
- "avm/res/authorization/policy-definition"
- "avm/res/authorization/policy-exemption"
- "avm/res/authorization/policy-set-definition"
- "avm/res/authorization/role-assignment"
- "avm/res/authorization/role-definition"
- "avm/res/automation/automation-account"
- "avm/res/batch/batch-account"
- "avm/res/cache/redis"
Expand All @@ -65,31 +63,31 @@ body:
- "avm/res/compute/proximity-placement-group"
- "avm/res/compute/ssh-public-key"
- "avm/res/compute/virtual-machine"
- "avm/res/compute/virtual-machine-scale-set"
# - "avm/res/compute/virtual-machine-scale-set"
- "avm/res/consumption/budget"
- "avm/res/container-instance/container-group"
# - "avm/res/container-instance/container-group"
- "avm/res/container-registry/registry"
- "avm/res/container-service/managed-cluster"
- "avm/res/databricks/access-connector"
- "avm/res/databricks/workspace"
- "avm/res/data-factory/factory"
- "avm/res/data-protection/backup-vault"
- "avm/res/databricks/access-connector"
- "avm/res/databricks/workspace"
- "avm/res/db-for-my-sql/flexible-server"
- "avm/res/db-for-postgre-sql/flexible-server"
- "avm/res/desktop-virtualization/application-group"
- "avm/res/desktop-virtualization/host-pool"
- "avm/res/desktop-virtualization/scaling-plan"
- "avm/res/desktop-virtualization/workspace"
- "avm/res/dev-center/devcenter"
# - "avm/res/dev-center/devcenter"
- "avm/res/dev-test-lab/lab"
- "avm/res/digital-twins/digital-twins-instance"
# - "avm/res/digital-twins/digital-twins-instance"
- "avm/res/document-db/database-account"
- "avm/res/event-grid/domain"
- "avm/res/event-grid/system-topic"
- "avm/res/event-grid/topic"
- "avm/res/event-hub/namespace"
# - "avm/res/event-hub/namespace"
- "avm/res/health-bot/health-bot"
- "avm/res/healthcare-apis/workspace"
# - "avm/res/healthcare-apis/workspace"
- "avm/res/insights/action-group"
- "avm/res/insights/activity-log-alert"
- "avm/res/insights/component"
Expand All @@ -103,18 +101,18 @@ body:
- "avm/res/key-vault/vault"
- "avm/res/kubernetes-configuration/extension"
- "avm/res/kubernetes-configuration/flux-configuration"
- "avm/res/load-test-service/load-test"
# - "avm/res/load-test-service/load-test"
- "avm/res/logic/workflow"
- "avm/res/machine-learning-services/workspace"
- "avm/res/maintenance/maintenance-configuration"
- "avm/res/managed-identity/user-assigned-identity"
- "avm/res/managed-services/registration-definition"
# - "avm/res/managed-services/registration-definition"
- "avm/res/management/management-group"
- "avm/res/net-app/net-app-account"
- "avm/res/network/application-gateway"
- "avm/res/network/application-gateway-web-application-firewall-policy"
# - "avm/res/network/application-gateway"
# - "avm/res/network/application-gateway-web-application-firewall-policy"
- "avm/res/network/application-security-group"
- "avm/res/network/azure-firewall"
# - "avm/res/network/azure-firewall"
- "avm/res/network/bastion-host"
- "avm/res/network/connection"
- "avm/res/network/ddos-protection-plan"
Expand All @@ -133,14 +131,14 @@ body:
- "avm/res/network/network-interface"
- "avm/res/network/network-manager"
- "avm/res/network/network-security-group"
- "avm/res/network/network-watcher"
# - "avm/res/network/network-watcher"
- "avm/res/network/private-dns-zone"
- "avm/res/network/private-endpoint"
- "avm/res/network/private-link-service"
- "avm/res/network/public-ip-address"
- "avm/res/network/public-ip-prefix"
- "avm/res/network/route-table"
- "avm/res/network/service-endpoint-policy"
# - "avm/res/network/service-endpoint-policy"
- "avm/res/network/trafficmanagerprofile"
- "avm/res/network/virtual-hub"
- "avm/res/network/virtual-network"
Expand All @@ -150,36 +148,32 @@ body:
- "avm/res/network/vpn-site"
- "avm/res/operational-insights/workspace"
- "avm/res/operations-management/solution"
- "avm/res/policy-insights/remediation"
# - "avm/res/policy-insights/remediation"
- "avm/res/power-bi-dedicated/capacity"
- "avm/res/purview/account"
- "avm/res/recovery-services/vault"
- "avm/res/relay/namespace"
# - "avm/res/recovery-services/vault"
# - "avm/res/relay/namespace"
- "avm/res/resource-graph/query"
- "avm/res/resources/deployment-script"
- "avm/res/resources/resource-group"
- "avm/res/resources/tags"
# - "avm/res/resources/tags"
- "avm/res/search/search-service"
- "avm/res/service-bus/namespace"
- "avm/res/service-fabric/cluster"
- "avm/res/signal-r-service/signal-r"
- "avm/res/signal-r-service/web-pub-sub"
- "avm/res/sql/managed-instance"
# - "avm/res/service-fabric/cluster"
# - "avm/res/signal-r-service/signal-r"
# - "avm/res/signal-r-service/web-pub-sub"
# - "avm/res/sql/managed-instance"
- "avm/res/sql/server"
- "avm/res/storage/storage-account"
- "avm/res/synapse/private-link-hub"
- "avm/res/synapse/workspace"
- "avm/res/virtual-machine-images/image-template"
- "avm/res/web/connection"
- "avm/res/web/hosting-environment"
# - "avm/res/web/connection"
# - "avm/res/web/hosting-environment"
- "avm/res/web/serverfarm"
- "avm/res/web/site"
- "avm/res/web/static-site"
- "avm/ptn/avd-lza/insights"
- "avm/ptn/avd-lza/management-plane"
- "avm/ptn/avd-lza/networking"
- "avm/ptn/avd-lza/session-hosts"
- "avm/ptn/security/security-center"

validations:
required: true
- type: input
Expand Down Expand Up @@ -208,6 +202,6 @@ body:
id: correlation-id
attributes:
label: (Optional) Correlation Id
description: Please provide a correlation id f available and appropriate.
description: Please provide a correlation id if available and appropriate.
validations:
required: false
51 changes: 0 additions & 51 deletions .github/ISSUE_TEMPLATE/bug_report.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/ISSUE_TEMPLATE/module_proposal.yml

This file was deleted.

66 changes: 51 additions & 15 deletions .github/actions/templates/avm-getModuleTestFiles/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,75 @@ inputs:
modulePath:
description: "The path to the module's folder"
required: true
psRuleFilterRegex:
description: "The regex used to filter PSRule compliant files"
required: true
default: "(defaults|waf-aligned)"

outputs:
moduleTestFilePaths:
description: "The module test files to use for template evaluation"
value: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }}
psRuleModuleTestFilePaths:
description: "The module test files to use for PSRule evaluation"
value: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }}

runs:
using: "composite"
steps:
- name: "Get parameter file paths"
- name: "Get module test file paths"
id: get-module-test-file-paths
shell: pwsh
run: |
# Grouping task logs
Write-Output '::group::Get parameter files'
# Load used functions
. (Join-Path $env:GITHUB_WORKSPACE 'avm' 'utilities' 'pipelines' 'sharedScripts' 'Get-ModuleTestFileList.ps1')
Write-Output '::group::Get all test files'
# Get the list of parameter file paths
$moduleFolderPath = Join-Path $env:GITHUB_WORKSPACE '${{ inputs.modulePath }}'
$functionInput = @{
ModulePath = Join-Path $env:GITHUB_WORKSPACE '${{ inputs.modulePath }}'
$testFilePaths = (Get-ChildItem -Path $moduleFolderPath -Recurse -Filter 'main.test.bicep').FullName | Sort-Object
$testFilePaths = $testFilePaths | ForEach-Object {
$_.Replace($moduleFolderPath, '').Trim('\').Trim('/')
}
Write-Verbose "Invoke task with" -Verbose
Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose
Write-Verbose 'Found all module test files' -Verbose
$testFilePaths | ForEach-Object { Write-Verbose "- [$_]" -Verbose }
# Get the list of parameter file paths
$testFilePaths = Get-ModuleTestFileList @functionInput -Verbose
# Output values to be accessed by next jobs
$deployCompressedOutput = $testFilePaths | ForEach-Object {
@{
path = $_
name = Split-Path (Split-Path $_) -Leaf
}
} | ConvertTo-Json -Compress
# Output values to be accessed by next jobs
if($deployCompressedOutput -notmatch "\[.*\]") {
$deployCompressedOutput = "[$deployCompressedOutput]"
}
Write-Verbose "Publishing output: $deployCompressedOutput" -Verbose
Write-Output ('{0}={1}' -f 'moduleTestFilePaths', $deployCompressedOutput) >> $env:GITHUB_OUTPUT
Write-Output '::endgroup::'
Write-Output '::group::Get PSRule test files'
$psRuleTestFilePaths = $testFilePaths | Where-Object { $_ -match '${{ inputs.psRuleFilterRegex }}' }
Write-Verbose 'Found PSRule module test files' -Verbose
$psRuleTestFilePaths | ForEach-Object { Write-Verbose "- [$_]" -Verbose }
# Output values to be accessed by next jobs
$compressedOutput = $testFilePaths | ConvertTo-Json -Compress
if($compressedOutput -notmatch "\[.*\]") {
$compressedOutput = "[$compressedOutput]"
$psRuleCompressedOutput = $psRuleTestFilePaths | ForEach-Object {
@{
path = $_
name = Split-Path (Split-Path $_) -Leaf
}
} | ConvertTo-Json -Compress
if($psRuleCompressedOutput -notmatch "\[.*\]") {
$psRuleCompressedOutput = "[$psRuleCompressedOutput]"
}
Write-Verbose "Publishing output: $compressedOutput" -Verbose
Write-Output ('{0}={1}' -f 'moduleTestFilePaths', $compressedOutput) >> $env:GITHUB_OUTPUT
Write-Verbose "Publishing output: $psRuleCompressedOutput" -Verbose
Write-Output ('{0}={1}' -f 'psRuleModuleTestFilePaths', $psRuleCompressedOutput) >> $env:GITHUB_OUTPUT
Write-Output '::endgroup::'
Loading

0 comments on commit 7a235ba

Please sign in to comment.