Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
"name": "Ubuntu",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"features": {
"ghcr.io/devcontainers/features/azure-cli:1": {},
"ghcr.io/devcontainers/features/powershell:1": {}
},
"customizations": {
"vscode": {
"extensions": [
"ms-azuretools.vscode-bicep"
]
}
}

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "uname -a",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
12 changes: 6 additions & 6 deletions bicep/ade.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ param adeProjectUser string = ''
@description('A PAT token is required, even for public repos')
param catalogRepoPat string

resource dc 'Microsoft.DevCenter/devcenters@2022-11-11-preview' existing = {
resource dc 'Microsoft.DevCenter/devcenters@2023-04-01' existing = {
name: devcenterName
}

resource project 'Microsoft.DevCenter/projects@2022-11-11-preview' existing = {
resource project 'Microsoft.DevCenter/projects@2023-04-01' existing = {
name: projectTeamName
}

Expand Down Expand Up @@ -46,12 +46,12 @@ module rbac 'devboxrbac.bicep' = {
}
}

resource env 'Microsoft.DevCenter/devcenters/environmentTypes@2022-11-11-preview' = {
resource env 'Microsoft.DevCenter/devcenters/environmentTypes@2023-04-01' = {
name: environmentName
parent: dc
}

resource catalog 'Microsoft.DevCenter/devcenters/catalogs@2022-11-11-preview' = {
resource catalog 'Microsoft.DevCenter/devcenters/catalogs@2023-04-01' = {
name: catalogName
parent: dc
properties: {
Expand All @@ -65,7 +65,7 @@ resource catalog 'Microsoft.DevCenter/devcenters/catalogs@2022-11-11-preview' =
}

param environmentTypes array = ['Dev', 'Test', 'Staging']
resource envs 'Microsoft.DevCenter/devcenters/environmentTypes@2022-11-11-preview' = [for envType in environmentTypes :{
resource envs 'Microsoft.DevCenter/devcenters/environmentTypes@2023-04-01' = [for envType in environmentTypes :{
name: envType
parent: dc
}]
Expand All @@ -80,7 +80,7 @@ var rbacRoleId = {
}
output dti string = deploymentTargetId

resource projectAssign 'Microsoft.DevCenter/projects/environmentTypes@2022-11-11-preview' = [for envType in environmentTypes : {
resource projectAssign 'Microsoft.DevCenter/projects/environmentTypes@2023-04-01' = [for envType in environmentTypes : {
name: envType
parent: project
identity: {
Expand Down
8 changes: 4 additions & 4 deletions bicep/aib-devboxdef.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ param devcenterGalleryName string
@allowed(['ssd_256gb', 'ssd_512gb', 'ssd_1024gb'])
param storage string = 'ssd_256gb'

resource dc 'Microsoft.DevCenter/devcenters@2022-11-11-preview' existing = {
resource dc 'Microsoft.DevCenter/devcenters@2023-04-01' existing = {
name: devcenterName
}

resource dcGallery 'Microsoft.DevCenter/devcenters/galleries@2022-11-11-preview' existing = {
resource dcGallery 'Microsoft.DevCenter/devcenters/galleries@2023-04-01' existing = {
name: devcenterGalleryName
parent: dc
}

resource galleryimage 'Microsoft.DevCenter/devcenters/galleries/images@2022-11-11-preview' existing = {
resource galleryimage 'Microsoft.DevCenter/devcenters/galleries/images@2023-04-01' existing = {
name: imageName
parent: dcGallery
}

resource devboxdef 'Microsoft.DevCenter/devcenters/devboxdefinitions@2022-11-11-preview' = {
resource devboxdef 'Microsoft.DevCenter/devcenters/devboxdefinitions@2023-04-01' = {
name: imageName
parent: dc
location: location
Expand Down
6 changes: 3 additions & 3 deletions bicep/aib.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ param nameseed string = 'dbox'

param devcenterName string

resource dc 'Microsoft.DevCenter/devcenters@2022-11-11-preview' existing = {
resource dc 'Microsoft.DevCenter/devcenters@2023-04-01' existing = {
name: devcenterName
}

resource dcGallery 'Microsoft.DevCenter/devcenters/galleries@2022-11-11-preview' = {
resource dcGallery 'Microsoft.DevCenter/devcenters/galleries@2023-04-01' = {
name: 'ig${nameseed}'
parent: dc
properties: {
Expand Down Expand Up @@ -95,7 +95,7 @@ var imageBuildName = take('${imageName}-${imageSkuVersion}_${newguid}_Build',64)
@description('A unique string generated for each deployment, to make sure the script is always run.')
param newguid string = newGuid()

resource templateIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2022-01-31-preview' = {
resource templateIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
name: 'id-${nameseed}'
location: location
}
Expand Down
13 changes: 13 additions & 0 deletions bicep/bicepconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
// See https://aka.ms/bicep/config for more information on Bicep configuration options
// Press CTRL+SPACE/CMD+SPACE at any location to see Intellisense suggestions
"analyzers": {
"core": {
"rules": {
"use-recent-api-versions" : {
"level": "warning"
}
}
}
}
}
4 changes: 2 additions & 2 deletions bicep/common.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ param devboxProjectUser string
@description('Provide the AzureAd UserId to assign project rbac for (get the current user with az ad signed-in-user show --query id)')
param devboxProjectAdmin string = ''

resource dc 'Microsoft.DevCenter/devcenters@2022-11-11-preview' = {
resource dc 'Microsoft.DevCenter/devcenters@2023-04-01' = {
name: 'dc-${nameseed}'
location: location
identity: {
type: 'SystemAssigned'
}
}

resource project 'Microsoft.DevCenter/projects@2022-11-11-preview' = {
resource project 'Microsoft.DevCenter/projects@2023-04-01' = {
name: projectTeamName
location: location
properties: {
Expand Down
10 changes: 5 additions & 5 deletions bicep/devbox.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ var regionTimeZones = loadJsonContent('azure-region-lookup.json')
@description('All locations, in one array')
var allLocations = concat([location],extraLocations)

resource dc 'Microsoft.DevCenter/devcenters@2022-11-11-preview' existing = {
resource dc 'Microsoft.DevCenter/devcenters@2023-04-01' existing = {
name: devcenterName
}

resource project 'Microsoft.DevCenter/projects@2022-11-11-preview' existing = {
resource project 'Microsoft.DevCenter/projects@2023-04-01' existing = {
name: projectTeamName
}

Expand Down Expand Up @@ -54,7 +54,7 @@ module networkingLocations 'devboxNetworking.bicep' = [for (loc, i) in allLocati
}
}]

resource win11ProjectPool 'Microsoft.DevCenter/projects/pools@2023-01-01-preview' = [ for (loc, i) in allLocations: {
resource win11ProjectPool 'Microsoft.DevCenter/projects/pools@2023-04-01' = [ for (loc, i) in allLocations: {
name: '${projectTeamName}-win11plain-${loc}'
location: location
parent: project
Expand All @@ -66,7 +66,7 @@ resource win11ProjectPool 'Microsoft.DevCenter/projects/pools@2023-01-01-preview
}
}]

resource vsProjectPool 'Microsoft.DevCenter/projects/pools@2023-01-01-preview' = [ for (loc, i) in allLocations: {
resource vsProjectPool 'Microsoft.DevCenter/projects/pools@2023-04-01' = [ for (loc, i) in allLocations: {
name: '${projectTeamName}-vs2022-${loc}'
location: location
parent: project
Expand All @@ -79,7 +79,7 @@ resource vsProjectPool 'Microsoft.DevCenter/projects/pools@2023-01-01-preview' =
}]

@description('This loop expression might look complex, but it is simply just creating a schedule for every pool in every region')
resource scheduleStop 'Microsoft.DevCenter/projects/pools/schedules@2023-01-01-preview' = [ for (loc, i) in allLocations: {
resource scheduleStop 'Microsoft.DevCenter/projects/pools/schedules@2023-04-01' = [ for (loc, i) in allLocations: {
name: '${projectTeamName}/${projectTeamName}-${i % 2 == 0 ? 'win11plain' : 'vs2022'}-${loc}/default'
dependsOn: [
win11ProjectPool[i]
Expand Down
8 changes: 4 additions & 4 deletions bicep/devboxNetworking.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ param subnetAddress string = '10.0.0.0/24'
@description('The name of a new resource group that will be created to store some Networking resources (like NICs) in')
param networkingResourceGroupName string = '${resourceGroup().name}-networking-${location}'

resource dc 'Microsoft.DevCenter/devcenters@2022-11-11-preview' existing = {
resource dc 'Microsoft.DevCenter/devcenters@2023-04-01' existing = {
name: devcenterName
}

resource virtualNetwork 'Microsoft.Network/virtualNetworks@2022-07-01' = {
resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-05-01' = {
name: 'vnet-${nameseed}-${location}'
location: location
properties: {
Expand All @@ -33,7 +33,7 @@ resource virtualNetwork 'Microsoft.Network/virtualNetworks@2022-07-01' = {
}
}

resource networkconnection 'Microsoft.DevCenter/networkConnections@2022-11-11-preview' = {
resource networkconnection 'Microsoft.DevCenter/networkConnections@2023-04-01' = {
name: 'con-${nameseed}-${location}'
location: location
properties: {
Expand All @@ -43,7 +43,7 @@ resource networkconnection 'Microsoft.DevCenter/networkConnections@2022-11-11-pr
}
}

resource attachedNetwork 'Microsoft.DevCenter/devcenters/attachednetworks@2022-11-11-preview' = {
resource attachedNetwork 'Microsoft.DevCenter/devcenters/attachednetworks@2023-04-01' = {
name: 'dcon-${nameseed}-${location}'
parent: dc
properties: {
Expand Down
8 changes: 4 additions & 4 deletions bicep/devboxdef.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ var defaultImageMap = {
vs2022win11m365: 'microsoftvisualstudio_visualstudioplustools_vs-2022-ent-general-win11-m365-gen2'
}

resource dc 'Microsoft.DevCenter/devcenters@2022-11-11-preview' existing = {
resource dc 'Microsoft.DevCenter/devcenters@2023-04-01' existing = {
name: devcenterName
}

resource gallery 'Microsoft.DevCenter/devcenters/galleries@2022-11-11-preview' existing = {
resource gallery 'Microsoft.DevCenter/devcenters/galleries@2023-04-01' existing = {
name: galleryName
parent: dc
}

resource galleryimage 'Microsoft.DevCenter/devcenters/galleries/images@2022-11-11-preview' existing = {
resource galleryimage 'Microsoft.DevCenter/devcenters/galleries/images@2023-04-01' existing = {
name: defaultImageMap['${image}']
parent: gallery
}
output imageGalleryId string = galleryimage.id

resource devboxdef 'Microsoft.DevCenter/devcenters/devboxdefinitions@2022-11-11-preview' = {
resource devboxdef 'Microsoft.DevCenter/devcenters/devboxdefinitions@2023-04-01' = {
name: definitionName
parent: dc
location: location
Expand Down
2 changes: 1 addition & 1 deletion bicep/devboxrbac.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
param keyVaultName string
param principalId string

resource kv 'Microsoft.KeyVault/vaults@2021-11-01-preview' existing = {
resource kv 'Microsoft.KeyVault/vaults@2023-02-01' existing = {
name: keyVaultName
}

Expand Down
4 changes: 2 additions & 2 deletions bicep/keyvault.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var kvIPRules = [for kvIp in keyVaultIPAllowlist: {
value: kvIp
}]

resource kv 'Microsoft.KeyVault/vaults@2021-11-01-preview' = {
resource kv 'Microsoft.KeyVault/vaults@2023-02-01' = {
name: akvName
location: location
properties: {
Expand All @@ -52,7 +52,7 @@ resource kv 'Microsoft.KeyVault/vaults@2021-11-01-preview' = {
enabledForDiskEncryption: false
enabledForTemplateDeployment: false
enableSoftDelete: keyVaultSoftDelete
enablePurgeProtection: keyVaultPurgeProtection ? true : json('null')
enablePurgeProtection: keyVaultPurgeProtection ? true : null
}
}

Expand Down