Knowledge check

Completed

Your colleague is using workload identities with a GitHub deployment workflow. The following code is the workflow definition file:

on:
  push:
    branches:
      - main
    paths:
      - 'deploy/**'

name: AzureBicepSample

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - uses: azure/login@v1
      with:
        client-id: '555e8321-44fb-4fbe-a009-77c9b5a9ef87'
        tenant-id: 'e091bbec-9737-44a1-afd2-48fc1fd84adf'
        subscription-id: 'ff979187-9cfb-4e3f-ac42-4868c6a3e4f5'
    - uses: azure/arm-deploy@v1
      with:
        resourceGroupName: MyResourceGroup
        template: ./deploy/main.bicep

The workflow returns the following error message:

Error:  Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable. Please make sure to give write permissions to id-token in the workflow.
1.

What should your colleague do to fix this error?

2.

Which of these statements about workload identities is true?

3.

You need to create a deployment workflow that deploys your infrastructure to three environments - development, test, and production. Each environment is in a dedicated resource group in three subscriptions. What should you do?

4.

You're creating a workload identity to run a deployment workflow. The workflow deploys a Bicep file that creates a single storage account. Which of the following options has the least privileged access that you need for your workflow?