Skip to content

Commit

Permalink
Merge branch 'Azure:main' into v2skus
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-box authored Apr 26, 2024
2 parents 9881f5e + a89a3ee commit 7fc9daf
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 14 deletions.
1 change: 1 addition & 0 deletions .github/workflows/avm.res.sql.instance-pool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:
removeDeployment:
type: boolean
description: "Remove deployed module"
# We had to set this to false because the SQL Instance Pool takes more than 24 hours to get deleted
required: false
default: false
push:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/platform.check.psrule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
- cron: "0 12 * * 0" # Weekly Sunday Analysis

env:
workflowPath: ".github/workflows/avm.platform.check.psrule.yml"
workflowPath: ".github/workflows/platform.check.psrule.yml"
targetPath: "avm/res/"
PSRuleOutputFilePath: "avm/res/PSRule-output.csv"
PSRuleInputFilePath: "avm/res/PSRule-output.md"
Expand Down
14 changes: 9 additions & 5 deletions avm/res/sql/instance-pool/tests/e2e/defaults/main.test.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of
param resourceGroupName string = 'dep-${namePrefix}-sql.instancepool-${serviceShort}-rg'

@description('Optional. The location to deploy resources to.')
#disable-next-line no-unused-params // A rotation location cannot be used for this test as the SQL Instance Pool deletion is not possible in the same deployment
param resourceLocation string = deployment().location

@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.')
Expand All @@ -21,6 +22,9 @@ param serviceShort string = 'sipmin'
@description('Optional. A token to inject into the name of each resource. This value can be automatically injected by the CI.')
param namePrefix string = '#_namePrefix_#'

@description('Optional. The static location of the resource group & resources.') // Note, we set the location of the SQL Instance Pool to avoid conflicts with the already existing ones
param tempLocation string = 'uksouth'

// ============ //
// Dependencies //
// ============ //
Expand All @@ -29,20 +33,20 @@ param namePrefix string = '#_namePrefix_#'
// =================
resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
name: resourceGroupName
location: resourceLocation
location: tempLocation
}

module nestedDependencies 'dependencies.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies'
name: '${uniqueString(deployment().name, tempLocation)}-nestedDependencies'
params: {
virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
pairedRegionScriptName: 'dep-${namePrefix}-ds-${serviceShort}'
nsgName: 'dep-${namePrefix}-nsg-${serviceShort}'
routeTableName: 'dep-${namePrefix}-rt-${serviceShort}'
sqlInstancePoolName: '${namePrefix}${serviceShort}001'
location: resourceLocation
location: tempLocation
}
}

Expand All @@ -52,10 +56,10 @@ module nestedDependencies 'dependencies.bicep' = {

module testDeployment '../../../main.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}'
name: '${uniqueString(deployment().name, tempLocation)}-test-${serviceShort}'
params: {
name: nestedDependencies.outputs.sqlInstancePoolName
location: resourceLocation
location: tempLocation
subnetResourceId: nestedDependencies.outputs.subnetId
}
}
14 changes: 9 additions & 5 deletions avm/res/sql/instance-pool/tests/e2e/waf-aligned/main.test.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b
param resourceGroupName string = 'dep-${namePrefix}-sql.instancepool-${serviceShort}-rg'

@description('Optional. The location to deploy resources to.')
#disable-next-line no-unused-params // A rotation location cannot be used for this test as the SQL Instance Pool deletion is not possible in the same deployment
param resourceLocation string = deployment().location

@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.')
Expand All @@ -21,6 +22,9 @@ param serviceShort string = 'sipwaf'
@description('Optional. A token to inject into the name of each resource. This value can be automatically injected by the CI.')
param namePrefix string = '#_namePrefix_#'

@description('Optional. The static location of the resource group & resources.') // Note, we set the location of the SQL Instance Pool to avoid conflicts with the already existing ones
param tempLocation string = 'northeurope'

// ============ //
// Dependencies //
// ============ //
Expand All @@ -29,20 +33,20 @@ param namePrefix string = '#_namePrefix_#'
// =================
resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
name: resourceGroupName
location: resourceLocation
location: tempLocation
}

module nestedDependencies 'dependencies.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies'
name: '${uniqueString(deployment().name, tempLocation)}-nestedDependencies'
params: {
virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
pairedRegionScriptName: 'dep-${namePrefix}-ds-${serviceShort}'
nsgName: 'dep-${namePrefix}-nsg-${serviceShort}'
routeTableName: 'dep-${namePrefix}-rt-${serviceShort}'
sqlInstancePoolName: '${namePrefix}${serviceShort}001'
location: resourceLocation
location: tempLocation
}
}

Expand All @@ -52,10 +56,10 @@ module nestedDependencies 'dependencies.bicep' = {

module testDeployment '../../../main.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}'
name: '${uniqueString(deployment().name, tempLocation)}-test-${serviceShort}'
params: {
name: nestedDependencies.outputs.sqlInstancePoolName
location: resourceLocation
location: tempLocation
skuName: 'GP_Gen8IM'
subnetResourceId: nestedDependencies.outputs.subnetId
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Mandatory. The URL of the GitHub issue, like 'https://github.com/Azure/bicep-reg
Set-AvmGitHubIssueOwnerConfig -Repo 'Azure/bicep-registry-modules' -IssueUrl 'https://github.com/Azure/bicep-registry-modules/issues/757'
.NOTES
Will be triggered by the workflow avm.platform.set-avm-github-issue-owner-config.yml
Will be triggered by the workflow platform.set-avm-github-issue-owner-config.yml
#>
function Set-AvmGitHubIssueOwnerConfig {
[CmdletBinding(SupportsShouldProcess)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Set-AvmGithubIssueForWorkflow -Repo 'owner/repo01' -LimitNumberOfRuns 100 -Limit
Check the last 100 workflow runs in the repository 'owner/repo01' that happened in the last 2 days. If the workflow name is 'Pipeline 01', then ignore the workflow run.
.NOTES
Will be triggered by the workflow avm.platform.manage-workflow-issue.yml
Will be triggered by the workflow platform.manage-workflow-issue.yml
#>
function Set-AvmGithubIssueForWorkflow {
[CmdletBinding(SupportsShouldProcess)]
Expand Down
2 changes: 1 addition & 1 deletion avm/utilities/pipelines/platform/Sync-AvmModulesList.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Optional. Path to the root of the repository.
Sync-AvmModulesList -Repo 'Azure/bicep-registry-modules'
.NOTES
Will be triggered by the workflow avm.platform.sync-avm-modules-list.yml
Will be triggered by the workflow platform.sync-avm-modules-list.yml
#>
function Sync-AvmModulesList {
param (
Expand Down

0 comments on commit 7fc9daf

Please sign in to comment.