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

tickets/DM-43454-foundation: use more limited keys for demo GHA #504

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
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/rsp-demo-gke-tf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: google-github-actions/setup-gcloud@v0
with:
version: '379.0.0'
service_account_key: ${{ secrets.GOOGLE_CREDENTIALS }}
service_account_key: ${{ secrets.PIPELINE_RSP_DEMO_GKE }}
project_id: ${{ secrets.GCP_PROJECT_ID }}
export_default_credentials: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rsp-demo-proj-tf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: google-github-actions/setup-gcloud@v0
with:
version: '379.0.0'
service_account_key: ${{ secrets.GOOGLE_CREDENTIALS }}
service_account_key: ${{ secrets.PIPELINE_RSP_DEMO_PROJECT }}
project_id: ${{ secrets.GCP_PROJECT_ID }}
export_default_credentials: true

Expand Down
20 changes: 20 additions & 0 deletions NEW_ENVIRONMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,26 @@ is just "copy an existing definition and replace the environment name".
Check this PR; when "Terraform plan" gives what look like the right
results, merge it.

## Key transplantation

At this point a project administrator will need to temporarily enable
the ability to extract service account keys. The two service accounts
just created should have their keys extracted and put into Github
secrets, as something like `PIPELINE_RSP_DEMO_PROJECT` and
`PIPELINE_RSP_DEMO_GKE`.

This is not the pattern we ultimately want. A future set of
improvements to [idf_deploy](.) will replace this with [keyless
authentication](https://cloud.google.com/blog/products/identity-security/enabling-keyless-authentication-from-github-actions).

## Descope GitHub Action accounts

Go back to the [Workflows](.github/workflows) and update the `proj` and
`gke` workflows to use the new keys just created, rather than
`GOOGLE_CREDENTIALS`.

Merge this PR.

## Additional tfvars files

Do the same for the GKE file (in this case, I would start with [the dev
Expand Down
Loading