Skip to content

Commit

Permalink
feat: pulumi up and docs for github and gcp auth
Browse files Browse the repository at this point in the history
  • Loading branch information
pablordoricaw committed Sep 17, 2024
1 parent a06a725 commit 4820e2f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pulumi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ on:
workflow_dispatch:

jobs:
preview:
pulumi:
permissions:
id-token: write
contents: read
name: Preview
name: Update
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Deploy infra
uses: pulumi/actions@v5
with:
command: preview
command: up
stack-name: pablordoricaw/dev
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,13 @@ After a few unsuccessful tries to fix the issue with Pulumi Deployments and GCP

First thing, I stored a Pulumi Cloud access token in the secrets of the repo for GitHub actions to authenticate with Pulumi Cloud. This token expires on 12/20/204

#### GitHub and GCP

I created a new service account called `github` and a new workload identity pool called `github-actions-pool` following the same instructions that I did to create the Pulumi ones.

Then in the `pulumi.yaml` GitHub Actions workflow I used these to authenticate with GCP. The following

- [GitHub docs](https://docs.github.com/en/actions/security-for-github-actions/security-hardening-your-deployments/configuring-openid-connect-in-google-cloud-platform)
- [GCP docs](https://cloud.google.com/iam/docs/workload-identity-federation-with-deployment-pipelines#by-pool)

were useful for this step.

0 comments on commit 4820e2f

Please sign in to comment.