Skip to content

Commit d92d38b

Browse files
Remove deprecated Bicep modules for Cognitive Services, Key Vault export, AI project, AI Hub, Container App Environment, Fetch Container Image, and Role assignments. These changes streamline the infrastructure code by eliminating unused resources and parameters, ensuring a cleaner and more maintainable codebase.
1 parent 3dd6d83 commit d92d38b

28 files changed

Lines changed: 90 additions & 6764 deletions
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: AZD Template Validation
2+
on:
3+
schedule:
4+
- cron: '30 1 * * 4' # Every Thursday at 7:00 AM IST (1:30 AM UTC)
5+
workflow_dispatch:
6+
7+
permissions:
8+
contents: read
9+
id-token: write
10+
pull-requests: write
11+
12+
jobs:
13+
template_validation:
14+
runs-on: ubuntu-latest
15+
name: azd template validation
16+
environment: production
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: microsoft/template-validation-action@v0.4.3
21+
with:
22+
validateAzd: ${{ vars.TEMPLATE_VALIDATE_AZD }}
23+
validateTests: ${{ vars.TEMPLATE_VALIDATE_TESTS }}
24+
useDevContainer: ${{ vars.TEMPLATE_USE_DEV_CONTAINER }}
25+
id: validation
26+
env:
27+
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
28+
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
29+
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
30+
AZURE_ENV_NAME: ${{ vars.AZURE_ENV_NAME }}
31+
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
32+
AZURE_AI_SERVICE_LOCATION: ${{ vars.AZURE_LOCATION }}
33+
AZURE_AI_MODEL_CAPACITY: 1 # keep low to avoid potential quota issues
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
36+
- name: print result
37+
run: cat ${{ steps.validation.outputs.resultFile }}

.github/workflows/azure-dev.yml

Lines changed: 43 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,55 @@
1-
name: Azure Template Validation
1+
name: Azure Dev Deploy
2+
23
on:
34
workflow_dispatch:
45

56
permissions:
67
contents: read
78
id-token: write
8-
pull-requests: write
99

1010
jobs:
11-
template_validation_job:
11+
deploy:
1212
runs-on: ubuntu-latest
1313
environment: production
14-
name: template validation
14+
env:
15+
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
16+
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
17+
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
18+
AZURE_ENV_NAME: ${{ vars.AZURE_ENV_NAME }}
19+
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
20+
AZURE_ENV_OPENAI_LOCATION : ${{ secrets.AZURE_AI_DEPLOYMENT_LOCATION }}
21+
AZURE_ENV_MODEL_CAPACITY: 1
22+
AZURE_ENV_MODEL_4_1_CAPACITY: 1
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
AZURE_DEV_COLLECT_TELEMETRY: ${{ vars.AZURE_DEV_COLLECT_TELEMETRY }}
1525
steps:
16-
# Step 1: Checkout the code from your repository
17-
- name: Checkout code
18-
uses: actions/checkout@v4
19-
# Step 2: Validate the Azure template using microsoft/template-validation-action
20-
- name: Validate Azure Template
21-
uses: microsoft/template-validation-action@bae4895d0a8abd4f0d5aad68ae8647b3027f4c91
22-
with:
23-
validateAzd: true
24-
useDevContainer: false
25-
id: validation
26-
env:
27-
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
28-
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
29-
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
30-
AZURE_ENV_NAME: ${{ secrets.AZURE_ENV_NAME }}
31-
AZURE_LOCATION: ${{ secrets.AZURE_LOCATION }}
32-
AZURE_ENV_OPENAI_LOCATION : ${{ secrets.AZURE_AI_DEPLOYMENT_LOCATION }}
33-
AZURE_ENV_MODEL_CAPACITY: 1
34-
AZURE_ENV_MODEL_4_1_CAPACITY: 1
35-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36-
AZURE_DEV_COLLECT_TELEMETRY: ${{ vars.AZURE_DEV_COLLECT_TELEMETRY }}
26+
- name: Checkout Code
27+
uses: actions/checkout@v4
28+
29+
- name: Install azd
30+
uses: Azure/setup-azd@v2
31+
32+
- name: Login to Azure
33+
uses: azure/login@v2
34+
with:
35+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
36+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
37+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
38+
39+
- name: Login to AZD
40+
shell: bash
41+
run: |
42+
azd auth login \
43+
--client-id "$AZURE_CLIENT_ID" \
44+
--federated-credential-provider "github" \
45+
--tenant-id "$AZURE_TENANT_ID"
3746
38-
# Step 3: Print the result of the validation
39-
- name: print result
40-
run: cat ${{ steps.validation.outputs.resultFile }}
47+
- name: Provision and Deploy
48+
shell: bash
49+
run: |
50+
if ! azd env select "$AZURE_ENV_NAME"; then
51+
azd env new "$AZURE_ENV_NAME" --subscription "$AZURE_SUBSCRIPTION_ID" --location "$AZURE_LOCATION" --no-prompt
52+
fi
53+
azd config set defaults.subscription "$AZURE_SUBSCRIPTION_ID"
54+
azd env set AZURE_ENV_OPENAI_LOCATION="$AZURE_ENV_OPENAI_LOCATION"
55+
azd up --no-prompt

infra/main.bicep

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1518,6 +1518,9 @@ module webSite 'modules/web-sites.bicep' = {
15181518
location: location
15191519
kind: 'app,linux,container'
15201520
serverFarmResourceId: webServerFarm.?outputs.resourceId
1521+
managedIdentities: {
1522+
systemAssigned: true
1523+
}
15211524
siteConfig: {
15221525
linuxFxVersion: 'DOCKER|${frontendContainerRegistryHostname}/${frontendContainerImageName}:${frontendContainerImageTag}'
15231526
minTlsVersion: '1.2'

infra/main.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
"_generator": {
77
"name": "bicep",
88
"version": "0.41.2.15936",
9-
"templateHash": "13556415974563619107"
9+
"templateHash": "11499679496885073074"
1010
},
1111
"name": "Multi-Agent Custom Automation Engine",
12-
"description": "This module contains the resources required to deploy the [Multi-Agent Custom Automation Engine solution accelerator](https://github.com/microsoft/Multi-Agent-Custom-Automation-Engine-Solution-Accelerator) for both Sandbox environments and WAF aligned environments.\n\n> **Note:** This module is not intended for broad, generic use, as it was designed by the Commercial Solution Areas CTO team, as a Microsoft Solution Accelerator. Feature requests and bug fix requests are welcome if they support the needs of this organization but may not be incorporated if they aim to make this module more generic than what it needs to be for its primary use case. This module will likely be updated to leverage AVM resource modules in the future. This may result in breaking changes in upcoming versions when these features are implemented.\n"
12+
"description": "This module contains the resources required to deploy the [Multi-Agent Custom Automation Engine solution accelerator](https://github.com/microsoft/Multi-Agent-Custom-Automation-Engine-Solution-Accelerator) for both Sandbox environments and WAF aligned environments.\r\n\r\n> **Note:** This module is not intended for broad, generic use, as it was designed by the Commercial Solution Areas CTO team, as a Microsoft Solution Accelerator. Feature requests and bug fix requests are welcome if they support the needs of this organization but may not be incorporated if they aim to make this module more generic than what it needs to be for its primary use case. This module will likely be updated to leverage AVM resource modules in the future. This may result in breaking changes in upcoming versions when these features are implemented.\r\n"
1313
},
1414
"parameters": {
1515
"solutionName": {
@@ -35201,6 +35201,11 @@
3520135201
"serverFarmResourceId": {
3520235202
"value": "[tryGet(reference('webServerFarm'), 'outputs', 'resourceId', 'value')]"
3520335203
},
35204+
"managedIdentities": {
35205+
"value": {
35206+
"systemAssigned": true
35207+
}
35208+
},
3520435209
"siteConfig": {
3520535210
"value": {
3520635211
"linuxFxVersion": "[format('DOCKER|{0}/{1}:{2}', parameters('frontendContainerRegistryHostname'), parameters('frontendContainerImageName'), parameters('frontendContainerImageTag'))]",

0 commit comments

Comments
 (0)