Skip to content

Commit

Permalink
fix: need to explicitly output credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
reakaleek committed Nov 28, 2024
1 parent e56dd2d commit 558c640
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test-aws-auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
- uses: actions/checkout@v4
- uses: ./aws/auth
id: auth
with:
output-credentials: true
- run: aws sts get-caller-identity

test:
Expand Down
1 change: 1 addition & 0 deletions aws/auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ AWS role ARN we use for Elastic Observability repositories.
| `aws-account-id` | The AWS account ID | `false` | `697149045717` |
| `aws-region` | The AWS region, e.g. us-east-1 | `false` | `us-east-1` |
| `role-duration-seconds` | The assumed role duration in seconds, if assuming a role. Defaults to 1 hour, but cannot exceed the maximum defined by the role. | `false` | `3600` |
| `output-credentials` | Whether to output the AWS credentials | `false` | `false` |
<!--/inputs-->

## Outputs
Expand Down
5 changes: 5 additions & 0 deletions aws/auth/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ inputs:
description: 'The assumed role duration in seconds, if assuming a role. Defaults to 1 hour, but cannot exceed the maximum defined by the role.'
required: false
default: '3600'
output-credentials:
description: 'Whether to output the AWS credentials'
required: false
default: 'false'

outputs:
role-arn:
Expand Down Expand Up @@ -70,3 +74,4 @@ runs:
aws-region: ${{ inputs.aws-region }}
role-to-assume: ${{ steps.generate-role-arn.outputs.role-arn }}
role-duration-seconds: ${{ inputs.role-duration-seconds }}
output-credentials: ${{ inputs.output-credentials }}

0 comments on commit 558c640

Please sign in to comment.