I am using GitHub Actions to run pulumi-pr.yml
I want to be able to deploy to different subscriptions based on the stack.
I created an az ad service principle and put the information in the Pulumi config using the following:
pulumi config set azure:clientId <clientID>
pulumi config set azure:clientSecret <clientSecret> --secret
pulumi config set azure:tenantId <tenantID>
pulumi config set azure:subscriptionId <subscriptionId>
When the GitHub action runs I get the following error:
error: building auth config: obtain subscription() from Azure CLI: Error parsing json result from the Azure CLI: Error waiting for the Azure CLI: exit status 1
Here is the entire yaml:
name: Pulumi Preview
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
preview:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Install Pulumi CLI
uses: pulumi/action-install-pulumi-cli@v1
- uses: pulumi/actions@v3
with:
command: preview
stack-name: trinsic/Cramer
work-dir: infrastructure/Source/Trinsic.Okapi
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}