Skip to content
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
78f93e9
Add submodule support in checkout step and set principalId in environ…
Harmanpreet-Microsoft Mar 30, 2026
58f1e44
Add timeout to template validation job and update principalId handling
Harmanpreet-Microsoft Mar 30, 2026
33dd3c2
Add TEMP environment variable and ensure timeout is set for template …
Harmanpreet-Microsoft Mar 30, 2026
08a473b
Configure bicepparam for service principal in template validation wor…
Harmanpreet-Microsoft Mar 30, 2026
480b376
Add submodule support in checkout step of Azure Dev workflow
Harmanpreet-Microsoft Apr 1, 2026
9211252
Add TEMP environment variable to Azure Dev workflow
Harmanpreet-Microsoft Apr 1, 2026
b2524f6
Add support for service principal in Azure Dev workflow
Harmanpreet-Microsoft Apr 1, 2026
4ba6f45
Merge pull request #3 from microsoft/main
Harmanpreet-Microsoft Apr 6, 2026
517abd6
feat: Configure Power BI API permissions for service principal in Azu…
Harmanpreet-Microsoft Apr 6, 2026
aaf5167
feat: Enhance infrastructure provisioning with retry mechanism and fr…
Harmanpreet-Microsoft Apr 6, 2026
ff47a00
feat: Add Power BI API access check before infrastructure provisioning
Harmanpreet-Microsoft Apr 6, 2026
beaaacf
refactor: Remove Power BI API permissions configuration and access ch…
Harmanpreet-Microsoft Apr 6, 2026
6574965
feat: Update AZD environment configuration to set principal type and …
Harmanpreet-Microsoft Apr 6, 2026
6297fe0
feat: Add resource group creation and environment setup in AZD workflow
Harmanpreet-Microsoft Apr 6, 2026
983e5ca
feat: Enhance resource group creation logic to derive name from envir…
Harmanpreet-Microsoft Apr 6, 2026
586e2bd
feat: Add re-authentication and retry logic for infrastructure provis…
Harmanpreet-Microsoft Apr 6, 2026
b365ea2
feat: Add resource group deletion check and retry logic during provis…
Harmanpreet-Microsoft Apr 6, 2026
1c1e6a5
feat: Update fabricWorkspaceMode to 'none' for consistent environment…
Harmanpreet-Microsoft Apr 6, 2026
5e2408e
feat: Remove re-authentication and retry logic from infrastructure pr…
Harmanpreet-Microsoft Apr 6, 2026
a04622d
feat: Remove timeout setting from infrastructure provisioning step
Harmanpreet-Microsoft Apr 6, 2026
195cf60
feat: Refactor principal type and ID handling in workflow and paramet…
Harmanpreet-Microsoft Apr 8, 2026
5d299d5
feat: Remove service principal ID retrieval and AZD environment confi…
Harmanpreet-Microsoft Apr 8, 2026
b2e390a
feat: Add AZURE_PRINCIPAL_ID and AZURE_PRINCIPAL_TYPE to environment …
Harmanpreet-Microsoft Apr 8, 2026
4559409
feat: Enhance Service Principal Object ID resolution logic in workflow
Harmanpreet-Microsoft Apr 8, 2026
cc157d2
feat: Remove Service Principal Object ID resolution step from workflow
Harmanpreet-Microsoft Apr 8, 2026
09ebdeb
Update Azure DevOps workflow for service principal handling
Harmanpreet-Microsoft Apr 8, 2026
d0985cd
Update workflow triggers for AZD template validation
Harmanpreet-Microsoft Apr 9, 2026
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
11 changes: 11 additions & 0 deletions .github/workflows/azd-template-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
name: azd template validation
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

# This postprovision cleanup step (Stage 19) has been removed from azure.yaml because
# azd down was failing in the pipeline. As a workaround, we are removing this step
Expand All @@ -24,6 +26,12 @@ jobs:
run: |
yq -i 'del(.hooks.postprovision[] | select(.run == "./submodules/ai-landing-zone/bicep/scripts/postprovision.ps1"))' azure.yaml

# Set principalType to ServicePrincipal for CI/CD deployment
- name: Configure bicepparam for service principal
run: |
sed -i "s/param principalType = 'User'/param principalType = readEnvironmentVariable('principalType', 'User')/" infra/main.bicepparam
sed -i "s/param principalId = ''/param principalId = readEnvironmentVariable('principalId', '')/" infra/main.bicepparam

- uses: microsoft/template-validation-action@Latest
with:
validateAzd: ${{ vars.TEMPLATE_VALIDATE_AZD }}
Expand All @@ -36,6 +44,9 @@ jobs:
AZURE_ENV_NAME: ${{ vars.AZURE_ENV_NAME }}
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TEMP: /tmp
fabricCapacityMode: 'none'
principalId: ${{ vars.PRINCIPAL_ID || secrets.AZURE_CLIENT_ID }}
principalType: 'ServicePrincipal'
- name: print result
run: cat ${{ steps.validation.outputs.resultFile }}
49 changes: 48 additions & 1 deletion .github/workflows/azure-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,16 @@ jobs:
AZURE_RESOURCE_GROUP: ${{ vars.AZURE_RESOURCE_GROUP }}
AZURE_ENV_NAME: ${{ vars.AZURE_ENV_NAME }}
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
AZURE_USER_OBJECT_ID: ''
TEMP: /tmp
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure bicepparam for service principal
run: |
sed -i "s/param principalType = 'User'/param principalType = readEnvironmentVariable('principalType', 'User')/" infra/main.bicepparam
Copy link
Copy Markdown
Collaborator

@Prajwal-Microsoft Prajwal-Microsoft Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can change these directly in main.bicepparm and make them configurable instead of changing for a pipeline run alone, I think Saswato might have already done the change, connect with him and check

sed -i "s/param principalId = ''/param principalId = readEnvironmentVariable('principalId', '')/" infra/main.bicepparam
- name: Install azd
uses: Azure/setup-azd@v2
- name: Azure Developer CLI Login
Expand All @@ -43,7 +49,48 @@ jobs:
client-id: ${{ vars.AZURE_CLIENT_ID }}
tenant-id: ${{ vars.AZURE_TENANT_ID }}
subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
- name: Get Service Principal Object ID
id: get-sp-id
run: |
SP_OBJECT_ID=$(az ad sp show --id ${{ vars.AZURE_CLIENT_ID }} --query id -o tsv)
echo "principalId=$SP_OBJECT_ID" >> $GITHUB_ENV
echo "Service Principal Object ID: $SP_OBJECT_ID"
- name: Create Resource Group if needed
run: |
# Use provided RG name or derive from environment name
RESOURCE_GROUP="${AZURE_RESOURCE_GROUP:-rg-${AZURE_ENV_NAME}}"
echo "Using resource group: $RESOURCE_GROUP"

RG_EXISTS=$(az group exists --name "$RESOURCE_GROUP")
if [ "$RG_EXISTS" = "false" ]; then
echo "Creating resource group: $RESOURCE_GROUP"
az group create --name "$RESOURCE_GROUP" --location ${{ vars.AZURE_LOCATION }}
else
echo "Resource group already exists: $RESOURCE_GROUP"
fi

# Set for subsequent steps
echo "RESOURCE_GROUP=$RESOURCE_GROUP" >> $GITHUB_ENV
- name: Configure AZD Environment
run: |
# Create environment if it doesn't exist
if azd env list 2>/dev/null | grep -q "${{ vars.AZURE_ENV_NAME }}"; then
echo "Environment ${{ vars.AZURE_ENV_NAME }} already exists, selecting it"
azd env select ${{ vars.AZURE_ENV_NAME }}
else
echo "Creating new environment: ${{ vars.AZURE_ENV_NAME }}"
azd env new ${{ vars.AZURE_ENV_NAME }} --location ${{ vars.AZURE_LOCATION }} --subscription ${{ vars.AZURE_SUBSCRIPTION_ID }}
fi

# Set environment variables
azd env set AZURE_RESOURCE_GROUP "$RESOURCE_GROUP"
azd env set principalType ServicePrincipal
azd env set principalId $principalId
azd env set fabricWorkspaceMode none
- name: Provision Infrastructure
id: provision-main
continue-on-error: true
run: azd provision --no-prompt
env:
AZD_INITIAL_ENVIRONMENT_CONFIG: ${{ secrets.AZD_INITIAL_ENVIRONMENT_CONFIG }}
fabricWorkspaceMode: 'none'
Loading