-
Notifications
You must be signed in to change notification settings - Fork 149
chore: dev to main merge #131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
78f93e9
58f1e44
33dd3c2
08a473b
480b376
9211252
b2524f6
4ba6f45
517abd6
aaf5167
ff47a00
beaaacf
6574965
6297fe0
983e5ca
586e2bd
b365ea2
1c1e6a5
5e2408e
a04622d
605b81e
195cf60
529d37b
5d299d5
b2e390a
7e30209
80be276
4559409
cc157d2
09ebdeb
5a09ec2
ae8ee57
d0985cd
b6e4854
2047307
ab864e0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -24,26 +24,73 @@ jobs: | |||||
| AZURE_RESOURCE_GROUP: ${{ vars.AZURE_RESOURCE_GROUP }} | ||||||
| AZURE_ENV_NAME: ${{ vars.AZURE_ENV_NAME }} | ||||||
| AZURE_LOCATION: ${{ vars.AZURE_LOCATION }} | ||||||
| AZURE_USER_OBJECT_ID: '' | ||||||
| AZURE_PRINCIPAL_TYPE: 'ServicePrincipal' | ||||||
| TEMP: /tmp | ||||||
| steps: | ||||||
| - name: Checkout | ||||||
| uses: actions/checkout@v4 | ||||||
| with: | ||||||
| submodules: recursive | ||||||
|
|
||||||
| - name: Install azd | ||||||
| uses: Azure/setup-azd@v2 | ||||||
|
|
||||||
| - name: Azure Developer CLI Login | ||||||
| run: | | ||||||
| azd auth login ` | ||||||
| --client-id "$Env:AZURE_CLIENT_ID" ` | ||||||
| --federated-credential-provider "github" ` | ||||||
| --tenant-id "$Env:AZURE_TENANT_ID" | ||||||
| --tenant-id "$Env:AZURE_TENANT_ID" | ||||||
| shell: pwsh | ||||||
|
|
||||||
| - name: Azure CLI Login | ||||||
| uses: azure/login@v2 | ||||||
| with: | ||||||
| client-id: ${{ vars.AZURE_CLIENT_ID }} | ||||||
| tenant-id: ${{ vars.AZURE_TENANT_ID }} | ||||||
| subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }} | ||||||
|
|
||||||
| - name: Resolve Service Principal Object ID | ||||||
| run: | | ||||||
| # If PRINCIPAL_ID repo variable is set and is a valid GUID, use it directly | ||||||
| if [[ "${{ vars.PRINCIPAL_ID }}" =~ ^[0-9a-fA-F-]{36}$ ]]; then | ||||||
|
||||||
| if [[ "${{ vars.PRINCIPAL_ID }}" =~ ^[0-9a-fA-F-]{36}$ ]]; then | |
| if [[ "${{ vars.PRINCIPAL_ID }}" =~ ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The practical risk is low since vars.PRINCIPAL_ID is set by repo admins, not user input, so a malformed GUID here is unlikely in practice
Copilot
AI
Apr 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This step computes/creates a resource group but exports it as RESOURCE_GROUP, while the job/environment uses AZURE_RESOURCE_GROUP. If AZURE_RESOURCE_GROUP is empty, azd provision likely won't pick up RESOURCE_GROUP and may provision into a different RG than the one you just created. Export the derived value back into AZURE_RESOURCE_GROUP (or whatever azd expects) so the provisioning step uses the same RG.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -202,8 +202,22 @@ Edit `infra/main.bicepparam` or set environment variables: | |||||||||||||||||||||||||
| | `postgreSqlNetworkIsolation` | PostgreSQL private networking toggle (defaults to `networkIsolation`) | `networkIsolation` | | ||||||||||||||||||||||||||
| | `useExistingVNet` | Reuse an existing VNet | `false` | | ||||||||||||||||||||||||||
| | `existingVnetResourceId` | Existing VNet resource ID (when `useExistingVNet=true`) | `` | | ||||||||||||||||||||||||||
| | `vmUserName` | Jump box VM admin username | `` | | ||||||||||||||||||||||||||
| | `vmAdminPassword` | Jump box VM admin password | (prompted) | | ||||||||||||||||||||||||||
| | `vmUserName` | Jump box VM admin username | `VM_ADMIN_USERNAME` env var or `testvmuser` | | ||||||||||||||||||||||||||
| | `vmAdminPassword` | Jump box VM admin password | `VM_ADMIN_PASSWORD` env var | | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| For network-isolated deployments, set the VM credentials before running `azd up`: | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ```powershell | ||||||||||||||||||||||||||
| azd env set VM_ADMIN_USERNAME "youradminuser" | ||||||||||||||||||||||||||
| azd env set VM_ADMIN_PASSWORD "Use-A-Strong-Password-Here!" | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| If you prefer source-controlled defaults, set them in [infra/main.bicepparam](../infra/main.bicepparam) instead: | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ```bicep | ||||||||||||||||||||||||||
| param vmUserName = 'youradminuser' | ||||||||||||||||||||||||||
| param vmAdminPassword = 'Use-A-Strong-Password-Here!' | ||||||||||||||||||||||||||
|
Comment on lines
+215
to
+219
|
||||||||||||||||||||||||||
| If you prefer source-controlled defaults, set them in [infra/main.bicepparam](../infra/main.bicepparam) instead: | |
| ```bicep | |
| param vmUserName = 'youradminuser' | |
| param vmAdminPassword = 'Use-A-Strong-Password-Here!' | |
| Use `azd env set`, a secrets manager, or pipeline secret variables for the password. Do **not** commit VM passwords to source control. | |
| If you need a non-secret placeholder in [infra/main.bicepparam](../infra/main.bicepparam), keep the username only and reference the password from the environment: | |
| ```bicep | |
| param vmUserName = 'youradminuser' | |
| param vmAdminPassword = readEnvironmentVariable('VM_ADMIN_PASSWORD', '') |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -9,7 +9,7 @@ param location = readEnvironmentVariable('AZURE_LOCATION', '') | |||||
| param cosmosLocation = readEnvironmentVariable('AZURE_COSMOS_LOCATION', '') | ||||||
| // Entra object ID of the identity to grant RBAC (user, group, service principal, or UAI). Set this if Graph lookup is blocked. | ||||||
| param principalId = readEnvironmentVariable('AZURE_PRINCIPAL_ID', '') | ||||||
| param principalType = 'User' | ||||||
| param principalType = readEnvironmentVariable('AZURE_PRINCIPAL_TYPE', 'User') | ||||||
|
||||||
|
|
||||||
| // ======================================== | ||||||
| // OPTIONAL INPUTS (Existing Resources) | ||||||
|
|
@@ -204,7 +204,8 @@ param containerAppsList = [ | |||||
| } | ||||||
| ] | ||||||
|
|
||||||
| param vmAdminPassword = readEnvironmentVariable('VM_ADMIN_PASSWORD', '$(secretOrRandomPassword)') | ||||||
| param vmUserName = readEnvironmentVariable('VM_ADMIN_USERNAME', 'testvmuser') | ||||||
| param vmAdminPassword = readEnvironmentVariable('VM_ADMIN_PASSWORD', 'JumpboxAdminP@ssw0rd1234!') | ||||||
|
||||||
| param vmAdminPassword = readEnvironmentVariable('VM_ADMIN_PASSWORD', 'JumpboxAdminP@ssw0rd1234!') | |
| param vmAdminPassword = readEnvironmentVariable('VM_ADMIN_PASSWORD', '') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Falling back to
secrets.AZURE_CLIENT_IDforAZURE_PRINCIPAL_IDis likely incorrect: client/app ID is not the service principal object ID, and role assignments typically require the object ID. This can cause RBAC assignment failures during validation. Align this workflow with the object-ID resolution logic used inazure-dev.yml, or require an explicitPRINCIPAL_ID/AZURE_PRINCIPAL_IDvalue.