Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Task 03 - Introduce infrastructure as code

  • The following az cli commands will create an application registration and then service principal. This uses a sample app registration name of TechExcelUser.
    • az ad app create --display-name TechExcelUser. Copy the “appId” output to use in the next command.
    • az ad sp create --id {appId}
    • az ad sp create-for-rbac --name "TechExcelUser" --role contributor --scopes /subscriptions/{subscription_id}/resourceGroups/{resource_group_name} --json-auth. The output of this command should be the AZURE_CREDENTIALS secret.
  • The solution for this task is a YAML file in the solutions folder.
  • The solution for the advanced variant of this task is a separate YAML file in the solutions folder.
  • To enable Application Insights via the Azure portal, navigate to an App Service. Then, choose Application Insights from the Settings menu on the left-hand side. Next, select the “Turn on Application Insights” button to enable Application Insights. Finally, select “Apply” and then “Yes” to complete the process. Repeat this for the two remaining environments.