Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: assume IAM role before running cloudposse/github-action-atmos-get-setting #86

Merged
merged 2 commits into from
Aug 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,14 @@ runs:
suzuki-shunsuke/tfcmt:
tag: v4.11.0

- name: Configure Plan AWS Credentials
uses: aws-actions/[email protected]
with:
aws-region: ${{ steps.config.outputs.aws-region }}
role-to-assume: ${{ steps.config.outputs.terraform-plan-role }}
role-session-name: "atmos-terraform-plan-gitops"
mask-aws-account-id: "no"

- name: Get atmos settings
uses: cloudposse/github-action-atmos-get-setting@v1
id: component
Expand Down Expand Up @@ -172,15 +180,6 @@ runs:
echo "step_summary_file=${STEP_SUMMARY_FILE}" >> $GITHUB_OUTPUT
echo "issue_file=${ISSUE_SUMMARY_FILE}" >> $GITHUB_OUTPUT

- name: Configure Plan AWS Credentials
if: ${{ fromJson(steps.component.outputs.settings).enabled }}
uses: aws-actions/[email protected]
with:
aws-region: ${{ steps.config.outputs.aws-region }}
role-to-assume: ${{ steps.config.outputs.terraform-plan-role }}
role-session-name: "atmos-terraform-plan-gitops"
mask-aws-account-id: "no"

- name: Cache .terraform
id: cache
uses: actions/cache@v4
Expand Down
Loading