Skip to content

Fetching pulumi outputs returns no values #1330

@markodjukic

Description

@markodjukic

What happened?

Unsure if this is the intended function of this command, but I am trying to use the command: output in order to access outputs from the stack, as follows:

      - name: Get Pulumi Outputs
        id: pulumi-outputs
        uses: pulumi/actions@v6
        env:
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          AWS_REGION: us-east-2
          PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
        with:
          command: output
          stack-name: ${{ env.environment }}
          cloud-url: s3://abc-${{ env.environment }}-pulumi-state
          work-dir: infra
      - name: Check outputs
        run: |
          echo "Private Subnet IDs: ${{ steps.pulumi-outputs.outputs.privateSubnetIds }}"
          echo "ECS Security Group ID: ${{ steps.pulumi-outputs.outputs.ecsSgId }}"
          echo "RDS Security Group ID: ${{ steps.pulumi-outputs.outputs.rdsSgId }}"

However, no output provided:

Run echo "Raw outputs: "
  echo "Raw outputs: "
  shell: /usr/bin/bash -e {0}
  env:
    environment: dev
    AWS_DEFAULT_REGION: us-east-2
    AWS_REGION: us-east-2
    AWS_ACCESS_KEY_ID: ***
    AWS_SECRET_ACCESS_KEY: ***
    PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin
Raw outputs: <<<THIS IS BLANK
Run echo "Private Subnet IDs: "
  echo "Private Subnet IDs: "
  echo "ECS Security Group ID: "
  echo "RDS Security Group ID: "
  shell: /usr/bin/bash -e {0}
  env:
    environment: dev
    AWS_DEFAULT_REGION: us-east-2
    AWS_REGION: us-east-2
    AWS_ACCESS_KEY_ID: ***
    AWS_SECRET_ACCESS_KEY: ***
    PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin
Private Subnet IDs: <<<THIS IS BLANK
ECS Security Group ID: <<<THIS IS BLANK
RDS Security Group ID:<<<THIS IS BLANK

Example

Doing manual outputs like this works but I as hoping to avoid manual manipulation:

      - name: Debug Pulumi State
        env:
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          AWS_REGION: us-east-2
          PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
        run: |
          cd infra
          pulumi stack ls
          pulumi stack output --json || echo "Failed to get outputs"

Output of pulumi about

$ pulumi about
CLI          
Version      3.144.1
Go Version   go1.23.4
Go Compiler  gc

Plugins
KIND      NAME        VERSION
resource  aws         6.61.0
resource  awsx        2.19.0
language  nodejs      3.144.1
resource  postgresql  3.14.0

Host     
OS       debian
Version  12.8
Arch     x86_64

This project is written in nodejs: executable='/usr/local/bin/node' version='v22.12.0'

Current Stack: organization/abc-app/dev

TYPE                                                    URN
<<< REMOVED >>>

Found no pending operations associated with dev

Backend        
Name           e1eb7e53c9cd
URL            s3://abc-dev-pulumi-state
User           node
Organizations  
Token type     personal

Pulumi locates its logs in /tmp by default

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting-feedbackBlocked on input from the authorkind/bugSome behavior is incorrect or out of spec

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions