Skip to content

Commit

Permalink
Merge pull request #42 from AlexanderSehr/users/alsehr/managedPoolAVM
Browse files Browse the repository at this point in the history
feat: Implemented published 'Managed DevOps Pool' AVM module
  • Loading branch information
AlexanderSehr authored Oct 12, 2024
2 parents 8fae27a + 9fe814d commit ed93813
Show file tree
Hide file tree
Showing 7 changed files with 119 additions and 322 deletions.
12 changes: 6 additions & 6 deletions .azuredevops/managedDevOpsPool/variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ variables:
## GENERAL ##
#############
#region shared
vmImage_sbx: '' # 'ubuntu-latest' # Use this for microsoft-hosted agents
vmImage_dev: '' # 'ubuntu-latest' # Use this for microsoft-hosted agents
vmImage_prd: '' # 'ubuntu-latest' # Use this for microsoft-hosted agents
vmImage_sbx: 'ubuntu-latest' # Use this for microsoft-hosted agents
vmImage_dev: 'ubuntu-latest' # Use this for microsoft-hosted agents
vmImage_prd: 'ubuntu-latest' # Use this for microsoft-hosted agents

poolName_sbx: 'core-vmss' # Use this for self-hosted agents
poolName_dev: 'core-vmss' # Use this for self-hosted agents
poolName_prd: 'core-vmss' # Use this for self-hosted agents
poolName_sbx: '' # Use this for self-hosted agents
poolName_dev: '' # Use this for self-hosted agents
poolName_prd: '' # Use this for self-hosted agents

serviceConnection_sbx: '<PrivateConnection>'
serviceConnection_dev: '<PrivateConnection>'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ param waitForImageBuild bool = true
/////////////////////////////

module imageDeployment '../templates/image.deploy.bicep' = {
name: '${uniqueString(deployment().name)}-image-sbx'
name: '${uniqueString(deployment().name, resourceLocation)}-image-sbx'
params: {
resourceLocation: resourceLocation
deploymentsToPerform: deploymentsToPerform
Expand Down
2 changes: 1 addition & 1 deletion constructs/azureImageBuilder/templates/image.deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ param deploymentsToPerform string = 'Only assets & image'
// =========== //

module imageConstruct 'br/public:avm/ptn/virtual-machine-images/azure-image-builder:0.1.1' = {
name: '${deployment().name}-image-construct'
name: '${uniqueString(deployment().name, resourceLocation)}-image-construct'
params: {
deploymentsToPerform: deploymentsToPerform
resourceGroupName: resourceGroupName
Expand Down
6 changes: 1 addition & 5 deletions constructs/managedDevOpsPool/deploymentFiles/sbx.pool.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,11 @@ targetScope = 'subscription'
@description('Optional. Specifies the location for resources.')
param resourceLocation string = 'NorthEurope'

///////////////////////////////
// Deployment Properties //
///////////////////////////////

/////////////////////////////
// Template Deployment //
/////////////////////////////
module managedDevOpsPoolDeployment '../templates/pool.deploy.bicep' = {
name: '${uniqueString(deployment().name)}-managedPool-sbx'
name: '${uniqueString(deployment().name, resourceLocation)}-managedPool-sbx'
params: {
resourceLocation: resourceLocation
computeGalleryName: '<computeGalleryName>'
Expand Down
28 changes: 28 additions & 0 deletions constructs/managedDevOpsPool/templates/devCenter.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
@description('Required. ')
param location string

@description('Required. The name of the Dev Center to use for the DevOps Infrastructure Pool. Must be lower case and may contain hyphens.')
@minLength(3)
@maxLength(26)
param devCenterName string

@description('Required. The name of the Dev Center project to use for the DevOps Infrastructure Pool.')
@minLength(3)
@maxLength(63)
param devCenterProjectName string

resource devCenter 'Microsoft.DevCenter/devcenters@2024-02-01' = {
name: devCenterName
location: location
}

resource devCenterProject 'Microsoft.DevCenter/projects@2024-02-01' = {
name: devCenterProjectName
location: location
properties: {
devCenterId: devCenter.id
}
}

@description('The resource ID of the Dev Center project.')
output devCenterProjectResourceId string = devCenterProject.id
290 changes: 0 additions & 290 deletions constructs/managedDevOpsPool/templates/nestedPool.bicep

This file was deleted.

Loading

0 comments on commit ed93813

Please sign in to comment.