sparse-intern-71089
02/28/2022, 8:32 PMlittle-cartoon-10569
02/28/2022, 8:35 PMpulumi stack output
and grab the value from there.refined-terabyte-65361
02/28/2022, 8:39 PM- name: upload package to bucket
run: aws s3 cp accessRequest.zip <s3-bucket-name>
i will try adding pulumi stack output
thanksrefined-terabyte-65361
02/28/2022, 8:59 PM- uses: pulumi/actions@v3
name: get s3 bucket name to push package
with:
command: output
stack-name: dev
work-dir: awsResource/s3
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
error:
Error: Expected { command: "up" | "update" | "refresh" | "destroy" | "preview"; stackName: string; workDir: string; commentOnPr: boolean; options: { parallel?: number; message?: string; expectNoChanges?: boolean; diff?: boolean; replace?: string[]; target?: string[]; targetDependents?: boolean; editCommentOnPr?: boolean; userAgent?: "pulumi/actions@v3"; }; }, but was incompatible
little-cartoon-10569
02/28/2022, 9:00 PMstack
command. If you need it in another step, then you need to run the pulumi
command directly, and parse its output.little-cartoon-10569
02/28/2022, 9:00 PMrefined-terabyte-65361
02/28/2022, 9:04 PM- uses: pulumi/actions@v3
with:
command: up
stack-name: dev
#comment-on-pr: true
upsert: true
refresh: true
work-dir: awsResource/s3
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
- name: upload foo package to bucket
run: aws s3 cp foo.zip <bucket name from output of pulumi up >
little-cartoon-10569
02/28/2022, 9:12 PMpulumi stack output | grep bucketName
or similar. Unless the Pulumi action can store outputs in a workflow variable or similar... I don't think I've read anything about that.refined-terabyte-65361
02/28/2022, 9:57 PM- name: get s3 bucket name to push package
id: pulumiStackOutput
working-directory: awsResource/s3
env:
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
run: echo ::set-output name=bucketname::$(pulumi login ${{ secrets.AWS_BUCKET }} > /dev/null 2>&1 && pulumi stack output -j | jq -r .bucketName)
- name: print bucket name
run: echo ${{ steps.pulumiStackOutput.outputs.bucketname }}
little-cartoon-10569
02/28/2022, 10:06 PMlittle-cartoon-10569
02/28/2022, 10:07 PM