Skip to content

Commit a43838d

Browse files
Merge pull request #815 from microsoft/psl-github-issue-azdup
fix: enhance Azure template validation workflow, improve documentation, and update infrastructure configuration
2 parents 885a2c6 + 92eaed4 commit a43838d

4 files changed

Lines changed: 71 additions & 3 deletions

File tree

.github/workflows/azure-dev-validation.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Azure Template Validation
22
on:
3-
workflow_dispatch:
3+
workflow_dispatch:
44

55
permissions:
66
contents: read
@@ -11,6 +11,7 @@ permissions:
1111
jobs:
1212
template_validation_job:
1313
runs-on: ubuntu-latest
14+
environment: production
1415
name: Template validation
1516

1617
steps:
@@ -21,13 +22,19 @@ jobs:
2122
# Step 2: Validate the Azure template using microsoft/template-validation-action
2223
- name: Validate Azure Template
2324
uses: microsoft/template-validation-action@v0.4.4
25+
with:
26+
validateAzd: true
27+
useDevContainer: false
28+
validateTests: false
2429
id: validation
2530
env:
2631
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
2732
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
2833
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
2934
AZURE_ENV_NAME: ${{ secrets.AZURE_ENV_NAME }}
3035
AZURE_LOCATION: ${{ secrets.AZURE_LOCATION }}
36+
AZURE_ENV_OPENAI_LOCATION: ${{ vars.AZURE_ENV_OPENAI_LOCATION || 'eastus2' }}
37+
AZURE_ENV_USE_CASE: ${{ vars.AZURE_ENV_USE_CASE || 'telecom' }}
3138
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3239
AZURE_DEV_COLLECT_TELEMETRY: ${{ vars.AZURE_DEV_COLLECT_TELEMETRY }}
3340

.github/workflows/azure-dev.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Deploy to Azure
2+
3+
on:
4+
workflow_dispatch:
5+
# push:
6+
# branches:
7+
# - main
8+
9+
# Set up permissions for deploying with secretless Azure federated credentials
10+
# https://learn.microsoft.com/en-us/azure/developer/github/connect-from-azure?tabs=azure-portal%2Clinux#set-up-azure-login-with-openid-connect-authentication
11+
permissions:
12+
id-token: write
13+
contents: read
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
environment: production
19+
env:
20+
AZURE_CLIENT_ID: ${{ vars.AZURE_CLIENT_ID }}
21+
AZURE_TENANT_ID: ${{ vars.AZURE_TENANT_ID }}
22+
AZURE_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }}
23+
AZURE_ENV_NAME: ${{ vars.AZURE_ENV_NAME }}
24+
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
25+
AZURE_ENV_OPENAI_LOCATION: ${{ vars.AZURE_ENV_OPENAI_LOCATION || 'eastus2' }}
26+
AZURE_ENV_USE_CASE: ${{ vars.AZURE_ENV_USE_CASE || 'telecom' }}
27+
AZURE_DEV_COLLECT_TELEMETRY: ${{ vars.AZURE_DEV_COLLECT_TELEMETRY }}
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v6
31+
32+
- name: Install azd
33+
uses: Azure/setup-azd@v2.0.0
34+
35+
- name: Log in with Azure (Federated Credentials)
36+
run: |
37+
azd auth login `
38+
--client-id "$Env:AZURE_CLIENT_ID" `
39+
--federated-credential-provider "github" `
40+
--tenant-id "$Env:AZURE_TENANT_ID"
41+
shell: pwsh
42+
43+
- name: Provision Infrastructure
44+
run: azd provision --no-prompt
45+
env:
46+
AZD_INITIAL_ENVIRONMENT_CONFIG: ${{ secrets.AZD_INITIAL_ENVIRONMENT_CONFIG }}
47+
48+
- name: Deploy Application
49+
run: azd deploy --no-prompt

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ Leverages Azure Content Understanding, Foundry IQ, Azure OpenAI Service, Azure A
3434

3535
<br/>
3636

37+
## Features
38+
3739
### Key features
3840
<details open>
3941
<summary>Click to learn more about the key features this solution enables</summary>
@@ -58,6 +60,8 @@ Summarized conversations, topic generation, and key phrase extraction support fa
5860

5961

6062
<br /><br />
63+
## Getting Started
64+
6165
<h2><img src="./documents/Images/ReadMe/quick-deploy.png" width="48" />
6266
Quick deploy
6367
</h2>
@@ -79,6 +83,8 @@ Follow the quick deploy steps on the deployment guide to deploy this solution
7983
8084
<br/>
8185

86+
## Guidance
87+
8288
### Prerequisites and costs
8389
To deploy this solution accelerator, ensure you have access to an [Azure subscription](https://azure.microsoft.com/free/) with the necessary permissions to create **resource groups, resources, app registrations, and assign roles at the resource group level**. This should include Contributor role at the subscription level and Role Based Access Control role on the subscription and/or resource group level. Follow the steps in [Azure Account Set Up](./documents/AzureAccountSetUp.md).
8490

@@ -96,6 +102,11 @@ _Note: This is not meant to outline all costs as selected SKUs, scaled use, cust
96102

97103
<br/>
98104

105+
>⚠️ **Important:** To avoid unnecessary costs, remember to take down your app if it's no longer in use,
106+
either by deleting the resource group in the Portal or running `azd down`.
107+
108+
## Resources
109+
99110
| Product | Description | Tier / Expected Usage Notes | Cost |
100111
|---|---|---|---|
101112
| [Microsoft Foundry](https://learn.microsoft.com/en-us/azure/ai-foundry) | Used to orchestrate and build AI workflows that combine Azure AI services. | Free Tier | [Pricing](https://azure.microsoft.com/pricing/details/ai-studio/) |
@@ -112,8 +123,6 @@ _Note: This is not meant to outline all costs as selected SKUs, scaled use, cust
112123

113124
<br/>
114125

115-
>⚠️ **Important:** To avoid unnecessary costs, remember to take down your app if it's no longer in use,
116-
either by deleting the resource group in the Portal or running `azd down`.
117126

118127
<br /><br />
119128
<h2><img src="./documents/Images/ReadMe/business-scenario.png" width="48" />

infra/main.bicep

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,6 +1383,9 @@ module webSiteFrontend 'modules/web-sites.bicep' = {
13831383
location: location
13841384
kind: 'app,linux,container'
13851385
serverFarmResourceId: webServerFarm.outputs.resourceId
1386+
managedIdentities: {
1387+
systemAssigned: true
1388+
}
13861389
siteConfig: {
13871390
linuxFxVersion: 'DOCKER|${frontendContainerRegistryHostname}/${frontendContainerImageName}:${frontendContainerImageTag}'
13881391
minTlsVersion: '1.2'

0 commit comments

Comments
 (0)