Skip to content

Commit 5d8fbea

Browse files
fix: merging dev to main
2 parents 302fad8 + 0bdec21 commit 5d8fbea

12 files changed

Lines changed: 306 additions & 4588 deletions

File tree

.github/workflows/validate-bicep-params.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,16 @@ jobs:
3333
- name: Validate infra/ parameters
3434
id: validate_infra
3535
continue-on-error: true
36+
env:
37+
ACCELERATOR_NAME: ${{ env.accelerator_name }}
3638
run: |
3739
set +e
38-
python scripts/validate_bicep_params.py --dir infra --strict --no-color --json-output infra_results.json 2>&1 | tee infra_output.txt
40+
RUN_URL="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
41+
python scripts/validate_bicep_params.py --dir infra --strict --no-color \
42+
--json-output infra_results.json \
43+
--html-output email_body.html \
44+
--accelerator-name "${ACCELERATOR_NAME}" \
45+
--run-url "${RUN_URL}" 2>&1 | tee infra_output.txt
3946
EXIT_CODE=${PIPESTATUS[0]}
4047
set -e
4148
echo "## Infra Param Validation" >> "$GITHUB_STEP_SUMMARY"
@@ -60,24 +67,21 @@ jobs:
6067
name: bicep-validation-results
6168
path: |
6269
infra_results.json
70+
email_body.html
6371
retention-days: 30
6472

6573
- name: Send schedule notification on failure
6674
if: github.event_name == 'schedule' && steps.result.outputs.status == 'failure'
6775
env:
6876
LOGICAPP_URL: ${{ secrets.EMAILNOTIFICATION_LOGICAPP_URL_TA }}
69-
GITHUB_REPOSITORY: ${{ github.repository }}
70-
GITHUB_RUN_ID: ${{ github.run_id }}
7177
ACCELERATOR_NAME: ${{ env.accelerator_name }}
7278
run: |
73-
RUN_URL="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
74-
INFRA_OUTPUT=$(sed 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g' infra_output.txt)
79+
EMAIL_BODY=$(cat email_body.html)
7580
7681
jq -n \
7782
--arg name "${ACCELERATOR_NAME}" \
78-
--arg infra "$INFRA_OUTPUT" \
79-
--arg url "$RUN_URL" \
80-
'{subject: ("Bicep Parameter Validation Report - " + $name + " - Issues Detected"), body: ("<p>Dear Team,</p><p>The scheduled <strong>Bicep Parameter Validation</strong> for <strong>" + $name + "</strong> has detected parameter mapping errors.</p><p><strong>infra/ Results:</strong></p><pre>" + $infra + "</pre><p><strong>Run URL:</strong> <a href=\"" + $url + "\">" + $url + "</a></p><p>Please fix the parameter mapping issues at your earliest convenience.</p><p>Best regards,<br>Your Automation Team</p>")}' \
83+
--arg body "$EMAIL_BODY" \
84+
'{subject: ("Bicep Parameter Validation Report - " + $name + " - Issues Detected"), body: $body}' \
8185
| curl -X POST "${LOGICAPP_URL}" \
8286
-H "Content-Type: application/json" \
8387
-d @- || echo "Failed to send notification"
@@ -86,18 +90,14 @@ jobs:
8690
if: github.event_name == 'schedule' && steps.result.outputs.status == 'success'
8791
env:
8892
LOGICAPP_URL: ${{ secrets.EMAILNOTIFICATION_LOGICAPP_URL_TA }}
89-
GITHUB_REPOSITORY: ${{ github.repository }}
90-
GITHUB_RUN_ID: ${{ github.run_id }}
9193
ACCELERATOR_NAME: ${{ env.accelerator_name }}
9294
run: |
93-
RUN_URL="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
94-
INFRA_OUTPUT=$(sed 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g' infra_output.txt)
95+
EMAIL_BODY=$(cat email_body.html)
9596
9697
jq -n \
9798
--arg name "${ACCELERATOR_NAME}" \
98-
--arg infra "$INFRA_OUTPUT" \
99-
--arg url "$RUN_URL" \
100-
'{subject: ("Bicep Parameter Validation Report - " + $name + " - Passed"), body: ("<p>Dear Team,</p><p>The scheduled <strong>Bicep Parameter Validation</strong> for <strong>" + $name + "</strong> has completed successfully. All parameter mappings are valid.</p><p><strong>infra/ Results:</strong></p><pre>" + $infra + "</pre><p><strong>Run URL:</strong> <a href=\"" + $url + "\">" + $url + "</a></p><p>Best regards,<br>Your Automation Team</p>")}' \
99+
--arg body "$EMAIL_BODY" \
100+
'{subject: ("Bicep Parameter Validation Report - " + $name + " - Passed"), body: $body}' \
101101
| curl -X POST "${LOGICAPP_URL}" \
102102
-H "Content-Type: application/json" \
103103
-d @- || echo "Failed to send notification"

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,6 @@ Ensures consistent query translation across the organization.
183183

184184
### Security guidelines
185185

186-
This template uses Azure Key Vault for use by AI Foundry.
187-
188186
This template uses [Managed Identity](https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/overview) for all Azure service communication.
189187

190188
To ensure continued best practices in your own repository, we recommend that anyone creating solutions based on our templates ensure that the [Github secret scanning](https://docs.github.com/code-security/secret-scanning/about-secret-scanning) setting is enabled.
5.71 KB
Loading

infra/main.bicep

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,6 @@ var privateDnsZones = [
331331
'privatelink.openai.azure.com'
332332
'privatelink.services.ai.azure.com'
333333
'privatelink.documents.azure.com'
334-
'privatelink.vaultcore.azure.net'
335334
'privatelink.blob.${environment().suffixes.storage}'
336335
'privatelink.file.${environment().suffixes.storage}'
337336
'privatelink.monitor.azure.com' // Azure Monitor global endpoints (App Insights, DCE)
@@ -346,13 +345,12 @@ var dnsZoneIndex = {
346345
openAI: 1
347346
aiServices: 2
348347
cosmosDB: 3
349-
keyVault: 4
350-
storageBlob: 5
351-
storageFile: 6
352-
monitor: 7
353-
oms: 8
354-
ods: 9
355-
agentSvc: 10
348+
storageBlob: 4
349+
storageFile: 5
350+
monitor: 6
351+
oms: 7
352+
ods: 8
353+
agentSvc: 9
356354
}
357355

358356
// ===================================================
@@ -854,34 +852,6 @@ module storageAccount 'modules/storageAccount.bicep' = {
854852
}
855853
}
856854

857-
module keyVault 'modules/keyVault.bicep' = {
858-
name: take('module.keyVault.${solutionSuffix}', 64)
859-
#disable-next-line no-unnecessary-dependson
860-
dependsOn: [logAnalyticsWorkspace, virtualNetwork] // required due to optional flags that could change dependency
861-
params: {
862-
name: take('kv-${solutionSuffix}', 24)
863-
location: location
864-
sku: 'standard'
865-
logAnalyticsWorkspaceResourceId: enableMonitoring ? logAnalyticsWorkspaceResourceId : ''
866-
privateNetworking: enablePrivateNetworking
867-
? {
868-
virtualNetworkResourceId: virtualNetwork!.outputs.resourceId
869-
subnetResourceId: virtualNetwork!.outputs.pepsSubnetResourceId
870-
privateDnsZoneResourceId: avmPrivateDnsZones[dnsZoneIndex.keyVault]!.outputs.resourceId
871-
}
872-
: null
873-
roleAssignments: [
874-
{
875-
principalId: aiServices.outputs.?systemAssignedMIPrincipalId ?? appIdentity.outputs.principalId
876-
principalType: 'ServicePrincipal'
877-
roleDefinitionIdOrName: 'Key Vault Administrator'
878-
}
879-
]
880-
tags: allTags
881-
enableTelemetry: enableTelemetry
882-
}
883-
}
884-
885855
module cosmosDb 'modules/cosmosDb.bicep' = {
886856
name: take('module.cosmosDb.${solutionSuffix}', 64)
887857
#disable-next-line no-unnecessary-dependson

0 commit comments

Comments
 (0)