https://pulumi.com logo
#azure
Title
# azure
g

glamorous-teacher-20849

11/30/2023, 7:56 AM
Hi, i've followed the instructions here https://www.pulumi.com/registry/packages/azure-native/installation-configuration/#authenticate-using-a-service-principal but i'm still getting
Copy code
azure-native:resources:ResourceGroup resourceGroup  error: obtain subscription() from Azure CLI: parsing json result from the Azure CLI: waiting for the Azure CLI: exit status 1: ERROR: Please run 'az login' to setup account. 
26
     azure-native:resources:ResourceGroup resourceGroup **failed** 1 error
Is there something else to do?
Oh its because its tried to deploy master... I'm looking at a deployment for a PR with a successful preview. How do I deploy the PR?
doing it via the cli seems straight forward. is it not supported via the UI?
m

melodic-tomato-39005

12/01/2023, 1:46 PM
Hi Sam, what’s the overall scenario here? A GitHub or Azure DevOps PR? Pulumi needs to authenticate and deploy resources in Azure from the PR’s test suite?
g

glamorous-teacher-20849

12/02/2023, 9:06 AM
Yeah its a github PR deploying to azure
m

melodic-tomato-39005

12/03/2023, 5:56 AM
We do this ourselves as part of our CI suite. This is the configuration that we set in the GH workflow’s
env:
Copy code
ARM_CLIENT_ID: <application (client) id of your Active Directory application>
  ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
  ARM_ENVIRONMENT: public
  ARM_LOCATION: westus2
  ARM_SUBSCRIPTION_ID: <subscription id>
  ARM_TENANT_ID: <tenant id of your Active Directory application>
BTW, you can do this also without storing your client secret in GH, via OIDC.
g

glamorous-teacher-20849

12/03/2023, 7:34 AM
I'm not sure we are talking about the same thing. I want to from ../deployments/ have one of the "actions" run against a specific branch. Any action I perform seems to run against master. When I push a PR it seems to trigger a "preview" of that branch but I can't deploy it (from the UI)
Also theres something wrong with this paging ui