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

CI: Use GitHub org variable for AWS region #818

Merged
merged 1 commit into from
Apr 9, 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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
# configure AWS to run dev server necessary for `npm run test:ci`
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
aws-region: ${{ vars.AWS_DEFAULT_REGION }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On one hand, this reduces redundancy in having multiple AWS_DEFAULT_REGIONs defined. On the other hand, this moves AWS_DEFAULT_REGION away from other related variables, some of which must be kept as secrets:

image

Thoughts? Based on code search, this applies to nextstrain.org and forecasts-ncov.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've had to remove AWS_DEFAULT_REGION from secrets for any repo that uses the pathogen-repo-build workflow to prevent the AWS batch link from being borked (e.g. nextstrain/rsv#53 (comment)). I think this move will match expectations that only "real" secrets should be kept as secrets and other shared values can be the unmasked variables.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the added context! I agree better to properly scope usage of the secrets store. I'll follow through with the move here and in forecasts-ncov.

aws-access-key-id: ${{ secrets.DEV_SERVER_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.DEV_SERVER_AWS_SECRET_ACCESS_KEY }}
- run: aws sts get-caller-identity
Expand Down