g

    green-daybreak-91402

    4 months ago
    Hello all! 🙂 Im running a Pulumi preview command in Github Actions but it is failing due to the following error:
    error configuring Terraform AWS Provider: failed to get shared config profile,
    I am able to run preview, refresh and deploy locally with no issues. I have checked the correct AWS Credentials and Pulumi Access Token are being passed to the GH Actions workflow. Anyone seen and fixed this error before?
    b

    billowy-army-68599

    4 months ago
    how are you configured aws access in github? does
    aws sts get-caller-identity
    work? is it a self hosted runner?
    g

    green-daybreak-91402

    4 months ago
    We are using the pulumi GH Action:
    - uses: <docker://pulumi/actions>
            with:
              args: preview
            env:
              PULUMI_CI: pr
              PULUMI_ROOT: infra
              PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
              AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }}
              AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }}
    and in previous steps we are setting teh env variable values from GH secrets
    this is a normal GH hosted runner
    b

    billowy-army-68599

    4 months ago
    before you run that, can you run
    aws sts get-caller-identity
    shouldn't this be...
    AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
    AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
    instead of
    ${{ env.AWS_ACCESS_KEY_ID }}
    g

    green-daybreak-91402

    4 months ago
    good eye, but we are conditionally setting those depending on the branch so they ultimately come from
    env.
    im going to test
    aws sts get-caller-identity
    h

    high-morning-17948

    4 months ago
    @billowy-army-68599 if we didn't change anything in the deployment config, what could trigger this error:
    pulumi:pulumi:Stack hyperion-api-dev running error: Error: invocation of aws:iam/getAccountAlias:getAccountAlias returned an error: 1 error occurred:
    b

    billowy-army-68599

    4 months ago
    I have never seen that error...
    your AWS credentials don't seem to be valid: https://github.com/pulumi/pulumi/issues/1363
    g

    green-daybreak-91402

    4 months ago
    we’re trying now with the latest Pulumi GH Action:
    uses: pulumi/actions@v3
    we were previously using:
    uses: <docker://pulumi/actions>
    The issue seems to be related to using the latest Pulumi package versions:
    "@pulumi/aws": "^5.3.0",
        "@pulumi/awsx": "^0.40.0",
        "@pulumi/pulumi": "^3.30.0",
        "@pulumi/random": "^4.5.0",
    we reverted and it works as before…
    b

    billowy-army-68599

    4 months ago
    interesting, can you file an issue?
    g

    green-daybreak-91402

    4 months ago
    Yup, I created one in the pulumi/actions repo
    b

    billowy-army-68599

    4 months ago
    can you send a link? needs to be in pulumi-aws
    g

    green-daybreak-91402

    4 months ago