Skip to content

Commit d24418a

Browse files
committed
Update API Versions
1 parent b681035 commit d24418a

File tree

13 files changed

+111
-122
lines changed

13 files changed

+111
-122
lines changed

azure.yaml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,42 @@
22

33
name: ContosoDevExp
44

5-
# hooks:
6-
# preprovision:
7-
# shell: sh
8-
# continueOnError: false
9-
# interactive: true
10-
# run: |
11-
# #!/bin/bash
12-
13-
# set -e
14-
# defaultPlatform="github"
15-
16-
# # Add a if statement to check if the environment variable is set
17-
# if [ -z "${SOURCE_CONTROL_PLATFORM}" ]; then
18-
# echo "SOURCE_CONTROL_PLATFORM is not set. Setting it to '${defaultPlatform}' by default."
19-
# export SOURCE_CONTROL_PLATFORM="${SOURCE_CONTROL_PLATFORM:-${defaultPlatform}}"
20-
# else
21-
# echo "Existing SOURCE_CONTROL_PLATFORM is set to '${SOURCE_CONTROL_PLATFORM}'."
22-
# fi
23-
# ./setup.sh -e ${AZURE_ENV_NAME} -s ${SOURCE_CONTROL_PLATFORM}
24-
25-
265
hooks:
276
preprovision:
28-
shell: pwsh
7+
shell: sh
298
continueOnError: false
309
interactive: true
3110
run: |
32-
$ErrorActionPreference = "Stop"
33-
$defaultPlatform = "github"
11+
#!/bin/bash
12+
13+
set -e
14+
defaultPlatform="adogit"
15+
16+
# Add a if statement to check if the environment variable is set
17+
if [ -z "${SOURCE_CONTROL_PLATFORM}" ]; then
18+
echo "SOURCE_CONTROL_PLATFORM is not set. Setting it to '${defaultPlatform}' by default."
19+
export SOURCE_CONTROL_PLATFORM="${SOURCE_CONTROL_PLATFORM:-${defaultPlatform}}"
20+
else
21+
echo "Existing SOURCE_CONTROL_PLATFORM is set to '${SOURCE_CONTROL_PLATFORM}'."
22+
fi
23+
./setup.sh -e ${AZURE_ENV_NAME} -s ${SOURCE_CONTROL_PLATFORM}
24+
25+
26+
# hooks:
27+
# preprovision:
28+
# shell: pwsh
29+
# continueOnError: false
30+
# interactive: true
31+
# run: |
32+
# $ErrorActionPreference = "Stop"
33+
# $defaultPlatform = "github"
3434

35-
# Check if the environment variable is set
36-
if ([string]::IsNullOrEmpty($env:SOURCE_CONTROL_PLATFORM)) {
37-
Write-Host "SOURCE_CONTROL_PLATFORM is not set. Setting it to '$defaultPlatform' by default."
38-
$env:SOURCE_CONTROL_PLATFORM = $defaultPlatform
39-
} else {
40-
Write-Host "Existing SOURCE_CONTROL_PLATFORM is set to '$($env:SOURCE_CONTROL_PLATFORM)'."
41-
}
35+
# # Check if the environment variable is set
36+
# if ([string]::IsNullOrEmpty($env:SOURCE_CONTROL_PLATFORM)) {
37+
# Write-Host "SOURCE_CONTROL_PLATFORM is not set. Setting it to '$defaultPlatform' by default."
38+
# $env:SOURCE_CONTROL_PLATFORM = $defaultPlatform
39+
# } else {
40+
# Write-Host "Existing SOURCE_CONTROL_PLATFORM is set to '$($env:SOURCE_CONTROL_PLATFORM)'."
41+
# }
4242

43-
.\setup.ps1 -e $env:AZURE_ENV_NAME -s $env:SOURCE_CONTROL_PLATFORM
43+
# .\setup.ps1 -e $env:AZURE_ENV_NAME -s $env:SOURCE_CONTROL_PLATFORM

infra/settings/workload/devcenter.yaml

Lines changed: 59 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,21 @@
1212
# - Dev Center documentation: https://learn.microsoft.com/en-us/azure/dev-box/overview-what-is-microsoft-dev-box
1313
# - Azure RBAC roles: https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles
1414

15-
name: "devexp-devcenter"
15+
name: "devexp-devcenterAZDO"
1616
catalogItemSyncEnableStatus: "Enabled"
1717
microsoftHostedNetworkEnableStatus: "Enabled"
1818
installAzureMonitorAgentEnableStatus: "Enabled"
1919

2020
# Identity configuration for the Dev Center resource
2121
# Defines how the Dev Center authenticates and what permissions it has
2222
identity:
23-
type: "SystemAssigned"
23+
type: UserAssigned
2424

2525
# Role assignments section - defines permissions for Dev Center operation
2626
roleAssignments:
27-
# Dev Center role assignments
28-
# These roles control who can manage the Dev Center and its projects
29-
# Best practice: Assign roles based on team responsibilities
30-
# The following roles follow the principle of least privilege and best practices described in https://learn.microsoft.com/en-us/azure/dev-box/concept-dev-box-deployment-guide#organizational-roles-and-responsibilities guidance.
3127
devCenter:
3228
- id: "b24988ac-6180-42a0-ab88-20f7382dd24c"
33-
name: "Contributor" # Azure Contributor role for Dev Center management
29+
name: "Contributor"
3430
scope: "Subscription"
3531
- id: "18d7d88d-d35e-4fb5-a5c3-7773c20a72d9"
3632
name: "User Access Administrator"
@@ -46,7 +42,7 @@ identity:
4642
# Dev Manager role - for users who manage Dev Box deployments
4743
# These users can configure Dev Box definitions but typically don't use Dev Boxes
4844
- type: DevManager
49-
azureADGroupId: "5a1d1455-e771-4c19-aa03-fb4a08418f22" # Azure AD group ID for Dev Managers. You must create this group in Azure AD and replace the <Azure AD group ID>, the default value in this example is "Platform Engineering Team"
45+
azureADGroupId: "417d8ce2-1042-461a-9ac0-706826defaec"
5046
azureADGroupName: "Platform Engineering Team"
5147

5248
# RBAC roles assigned to Dev Managers
@@ -61,8 +57,8 @@ identity:
6157
# Best practice: Use Git repositories for configuration-as-code approach
6258
catalogs:
6359
- name: "customTasks"
64-
type: gitHub
65-
uri: "https://github.com/Evilazaro/DevExp-DevBox.git"
60+
type: adoGit
61+
uri: "https://[email protected].com/contososa2/DevExp-DevBox/_git/DevExp-DevBox"
6662
branch: "main"
6763
path: "/.configuration/devcenter/tasks"
6864

@@ -71,31 +67,31 @@ catalogs:
7167
# Best practice: Create environments that match your SDLC stages (dev, test, prod)
7268
environmentTypes:
7369
- name: "dev"
74-
deploymentTargetId: "" # Empty for default subscription target. If you want to deploy to a specific target, provide the target ID here.
70+
deploymentTargetId: "" # Empty for default subscription target
7571
- name: "staging"
76-
deploymentTargetId: "" # Empty for default subscription target. If you want to deploy to a specific target, provide the target ID here.
72+
deploymentTargetId: "" # Empty for default subscription target
7773
- name: "UAT"
78-
deploymentTargetId: "" # Empty for default subscription target. If you want to deploy to a specific target, provide the target ID here.
74+
deploymentTargetId: "" # Empty for default subscription target
7975

8076
# Projects section - defines distinct projects within the Dev Center
8177
# Each project has its own Dev Box configurations, catalogs, and permissions
8278
# Best practice: Create separate projects for different teams or workstreams
8379
projects:
8480
# Identity Provider project - for authentication/authorization services
85-
- name: "identityProvider" # Name of the project
86-
description: "Identity Provider project." # Project description
81+
- name: "identityProvider-AZDO"
82+
description: "Identity Provider project."
8783

8884
network:
89-
name: identityProvider # Name of the virtual network
90-
create: true # Set this parameter to true to create the network. If its value is false, the the accelerator will connect to an existing network.
91-
resourceGroupName: "identityProvider-connectivity-RG" # Resource group for network. If the create parameter is set to false, the resource group must already exist.
92-
virtualNetworkType: Managed # Managed network type is recommended for Dev Center projects to ensure proper connectivity and security
93-
addressPrefixes: # Address space for the virtual network. This should be a unique CIDR block that does not overlap with other networks in your Azure subscription. If the create parameter is set to true, the accelerator will create the network with this address space.
85+
name: identityProvider-AZDO
86+
create: true
87+
resourceGroupName: "identityProvider-AZDO-connectivity-RG"
88+
virtualNetworkType: Managed
89+
addressPrefixes:
9490
- 10.0.0.0/16
9591
subnets:
96-
- name: identityProvider-subnet # Subnet name. If the create parameter is set to true, the accelerator will create the subnet with this name and address prefix. If its value is false, the subnet must already exist.
92+
- name: identityProvider-AZDO-subnet
9793
properties:
98-
addressPrefix: 10.0.1.0/24 # Subnet address range. If the create parameter is set to true, the accelerator will create the subnet with this address range. If its value is false, the subnet must already exist.
94+
addressPrefix: 10.0.1.0/24
9995
tags:
10096
environment: dev
10197
division: Platforms
@@ -108,15 +104,9 @@ projects:
108104
# Project identity configuration - controls project-level security
109105
identity:
110106
type: SystemAssigned
111-
# Role assignments for the Project
112-
# These roles control who can manage the project and its resources
113-
# You must create the corresponding Azure AD groups and assign users to them
114-
# The default values in this example are "Identity Provider Engineers"
115-
# You can customize these values based on your organization's requirements
116-
# The following roles follow the principle of least privilege and best practices described in https://learn.microsoft.com/en-us/azure/dev-box/concept-dev-box-deployment-guide#organizational-roles-and-responsibilities guidance.
117107
roleAssignments:
118-
- azureADGroupId: "67a29bc3-f25c-4599-9cb1-4da19507e8ee" # Azure AD group ID for Identity Provider Engineers. You must create this group in Azure AD and replace the <Azure AD group ID>, the default value in this example is "Identity Provider Engineers"
119-
azureADGroupName: "Identity Provider Engineers" # Azure AD group name
108+
- azureADGroupId: "edcb3946-418d-4e8e-b67b-5e8ba099d671"
109+
azureADGroupName: "Identity Provider Engineers"
120110
azureRBACRoles:
121111
- name: "Contributor"
122112
id: "b24988ac-6180-42a0-ab88-20f7382dd24c"
@@ -156,14 +146,14 @@ projects:
156146
catalogs:
157147
environmentDefinition:
158148
name: "environments"
159-
type: gitHub
160-
uri: "https://github.com/Evilazaro/IdentityProvider.git"
149+
type: adoGit
150+
uri: "https://[email protected].com/contososa2/IdentityProvider/_git/IdentityProvider"
161151
branch: "main"
162152
path: "/.configuration/devcenter/environments"
163153
imageDefinition:
164154
name: "imageDefinitions"
165-
type: gitHub
166-
uri: "https://github.com/Evilazaro/IdentityProvider.git"
155+
type: adoGit
156+
uri: "https://[email protected].com/contososa2/IdentityProvider/_git/IdentityProvider"
167157
branch: "main"
168158
path: "/.configuration/devcenter/imageDefinitions"
169159

@@ -178,40 +168,39 @@ projects:
178168
owner: "Contoso" # Resource ownership
179169
resources: "Project" # Resource type identifier
180170

181-
- name: "eShop"
182-
description: "eShop project."
171+
- name: "eShop-AZDO"
172+
description: "eShop-AZDO project."
183173

184-
# Network configuration for eShop project
185174
network:
186-
name: eShop # Name of the virtual network
187-
create: true # Should the network be created?
188-
resourceGroupName: "eShop-connectivity-RG" # Resource group for network
189-
virtualNetworkType: Managed # Type of virtual network
175+
name: eShop-AZDO
176+
create: true
177+
resourceGroupName: "eShop-AZDO-connectivity-RG"
178+
virtualNetworkType: Managed
190179
addressPrefixes:
191-
- 10.0.0.0/16 # Address space for VNet
180+
- 10.0.0.0/16
192181
subnets:
193-
- name: eShop-subnet # Subnet name
182+
- name: eShop-AZDO-subnet
194183
properties:
195-
addressPrefix: 10.0.1.0/24 # Subnet address range
184+
addressPrefix: 10.0.1.0/24
196185
tags:
197-
environment: dev # Deployment environment
198-
division: Platforms # Organizational division
199-
team: DevExP # Team responsible
200-
project: DevExP-DevBox # Project name
201-
costCenter: IT # Cost center for billing
202-
owner: Contoso # Resource owner
203-
resources: Network # Resource type identifier
186+
environment: dev
187+
division: Platforms
188+
team: DevExP
189+
project: DevExP-DevBox
190+
costCenter: IT
191+
owner: Contoso
192+
resources: Network
204193

205194
# Project identity configuration - controls project-level security
206195
identity:
207-
type: SystemAssigned # Managed identity type
196+
type: SystemAssigned
208197
roleAssignments:
209-
- azureADGroupId: "9d42a792-2d74-441d-8bcb-71009371725f" # Azure AD group ID
210-
azureADGroupName: "eShop Developers" # Azure AD group name
198+
- azureADGroupId: "5d42557c-18cb-4eac-ac65-7fda1e4af0d9"
199+
azureADGroupName: "eShop-AZDO Developers"
211200
azureRBACRoles:
212-
- name: "Contributor" # RBAC role name
213-
id: "b24988ac-6180-42a0-ab88-20f7382dd24c" # RBAC role ID
214-
scope: Project # Role scope
201+
- name: "Contributor"
202+
id: "b24988ac-6180-42a0-ab88-20f7382dd24c"
203+
scope: Project
215204
- name: "Dev Box User"
216205
id: "45d50f46-0b78-4001-a660-4198cbe8cd05"
217206
scope: Project
@@ -228,35 +217,35 @@ projects:
228217
# Dev Box pools - collections of Dev Boxes with specific configurations
229218
# Best practice: Create role-specific pools with appropriate tools and settings
230219
pools:
231-
- name: "backend-engineer" # Pool for backend engineers
232-
imageDefinitionName: "eShop-backend-engineer" # Image definition for backend
233-
vmSku: general_i_32c128gb512ssd_v2 # VM SKU for backend pool
234-
- name: "frontend-engineer" # Pool for frontend engineers
235-
imageDefinitionName: "eShop-frontend-engineer" # Image definition for frontend
236-
vmSku: general_i_16c64gb256ssd_v2 # VM SKU for frontend pool
220+
- name: "backend-engineer"
221+
imageDefinitionName: "eShop-backend-engineer"
222+
vmSku: general_i_32c128gb512ssd_v2
223+
- name: "frontend-engineer"
224+
imageDefinitionName: "eShop-frontend-engineer"
225+
vmSku: general_i_16c64gb256ssd_v2
237226

238227
# Project-specific environment types
239228
# Defines which deployment environments are available to the project
240229
environmentTypes:
241-
- name: "dev" # Development environment
230+
- name: "dev"
242231
deploymentTargetId: ""
243-
- name: "staging" # Staging environment
232+
- name: "staging"
244233
deploymentTargetId: ""
245-
- name: "UAT" # User Acceptance Testing environment
234+
- name: "UAT"
246235
deploymentTargetId: ""
247236

248237
# Project-specific catalogs - repositories containing project configurations
249238
catalogs:
250239
environmentDefinition:
251240
name: "environments"
252-
type: gitHub
253-
uri: "https://github.com/Evilazaro/eShop.git"
241+
type: adoGit
242+
uri: "https://[email protected].com/contososa2/eShop/_git/eShop"
254243
branch: "main"
255244
path: "/.devcenter/environments"
256245
imageDefinition:
257246
name: "imageDefinitions"
258-
type: gitHub
259-
uri: "https://github.com/Evilazaro/eShop.git"
247+
type: adoGit
248+
uri: "https://[email protected].com/contososa2/eShop/_git/eShop"
260249
branch: "main"
261250
path: "/.devcenter/imageDefinitions"
262251

src/connectivity/networkConnection.bicep

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ param location string = resourceGroup().location
1414
param tags object = {}
1515

1616
@description('Reference to existing DevCenter instance')
17-
resource devcenter 'Microsoft.DevCenter/devcenters@2025-04-01-preview' existing = {
17+
resource devcenter 'Microsoft.DevCenter/devcenters@2025-02-01' existing = {
1818
name: devCenterName
1919
scope: resourceGroup()
2020
}
2121

2222
@description('Network Connection resource for DevCenter')
23-
resource netConnection 'Microsoft.DevCenter/networkConnections@2025-04-01-preview' = {
23+
resource netConnection 'Microsoft.DevCenter/networkConnections@2025-02-01' = {
2424
name: name
2525
location: location
2626
tags: tags
@@ -31,7 +31,7 @@ resource netConnection 'Microsoft.DevCenter/networkConnections@2025-04-01-previe
3131
}
3232

3333
@description('DevCenter Network Connection Attachment')
34-
resource vnetAttachment 'Microsoft.DevCenter/devcenters/attachednetworks@2025-04-01-preview' = {
34+
resource vnetAttachment 'Microsoft.DevCenter/devcenters/attachednetworks@2025-02-01' = {
3535
name: name
3636
parent: devcenter
3737
properties: {

src/identity/projectIdentityRoleAssignment.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ param roles array
1818
param principalType string
1919

2020
@description('Reference to the existing DevCenter project')
21-
resource project 'Microsoft.DevCenter/projects@2025-04-01-preview' existing = {
21+
resource project 'Microsoft.DevCenter/projects@2025-02-01' existing = {
2222
name: projectName
2323
}
2424

src/identity/projectIdentityRoleAssignmentRG.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ param roles array
1818
param principalType string
1919

2020
@description('Reference to the existing DevCenter project')
21-
resource project 'Microsoft.DevCenter/projects@2025-04-01-preview' existing = {
21+
resource project 'Microsoft.DevCenter/projects@2025-02-01' existing = {
2222
name: projectName
2323
}
2424

src/security/keyVault.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ param tags object
1111
param unique string = uniqueString(resourceGroup().id, location, subscription().subscriptionId, deployer().tenantId)
1212

1313
@description('Azure Key Vault')
14-
resource keyVault 'Microsoft.KeyVault/vaults@2024-12-01-preview' = {
14+
resource keyVault 'Microsoft.KeyVault/vaults@2024-11-01' = {
1515
name: '${keyvaultSettings.keyVault.name}-${unique}-kv'
1616
location: location
1717
tags: tags

src/workload/core/catalog.bicep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ type Catalog = {
3030
type CatalogType = 'gitHub' | 'adoGit'
3131

3232
@description('Reference to the existing DevCenter')
33-
resource devCenter 'Microsoft.DevCenter/devcenters@2025-04-01-preview' existing = {
33+
resource devCenter 'Microsoft.DevCenter/devcenters@2025-02-01' existing = {
3434
name: devCenterName
3535
}
3636

3737
@description('DevCenter catalog configuration')
38-
resource catalog 'Microsoft.DevCenter/devcenters/catalogs@2025-04-01-preview' = {
38+
resource catalog 'Microsoft.DevCenter/devcenters/catalogs@2025-02-01' = {
3939
name: catalogConfig.name
4040
parent: devCenter
4141
properties: union(

src/workload/core/devCenter.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ module devCenterMIroleAssignmentRG '../../identity/devCenterRoleAssignmentRG.bic
119119

120120
// Main DevCenter resource
121121
@description('Dev Center Resource')
122-
resource devcenter 'Microsoft.DevCenter/devcenters@2025-04-01-preview' = {
122+
resource devcenter 'Microsoft.DevCenter/devcenters@2025-02-01' = {
123123
name: devCenterName
124124
location: resourceGroup().location
125125
identity: {

0 commit comments

Comments
 (0)