File tree 2 files changed +15
-1
lines changed 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 17
17
- " flake.nix"
18
18
workflow_dispatch :
19
19
20
+
21
+ permissions :
22
+ # Necessary for GCP authentication (https://github.com/google-github-actions/setup-gcloud#usage)
23
+ id-token : write
24
+
20
25
jobs :
21
26
build_image :
22
27
if : github.actor != 'dependabot[bot]' # Skip Dependabot PRs
85
90
- name : Setup Terraform
86
91
uses : ./.github/actions/setup-tf
87
92
93
+ - name : Authenticate to Google Cloud
94
+ uses : google-github-actions/auth@v2
95
+ with :
96
+ workload_identity_provider : ${{ secrets.GCP_WORKLOAD_ID_PROVIDER }}
97
+ service_account : coder-ci@coder-dogfood.iam.gserviceaccount.com
98
+
88
99
- name : Terraform init and validate
89
100
run : |
90
101
cd dogfood
@@ -118,3 +129,4 @@ jobs:
118
129
TF_VAR_CODER_TEMPLATE_VERSION : ${{ steps.vars.outputs.sha_short }}
119
130
TF_VAR_CODER_TEMPLATE_DIR : ./contents
120
131
TF_VAR_CODER_TEMPLATE_MESSAGE : ${{ steps.message.outputs.pr_title }}
132
+ TF_LOG : info
Original file line number Diff line number Diff line change @@ -4,9 +4,11 @@ terraform {
4
4
source = " coder/coderd"
5
5
}
6
6
}
7
+ backend "gcs" {
8
+ bucket = " coder-dogfood-tf-state"
9
+ }
7
10
}
8
11
9
- // Alternative to committing a state file
10
12
import {
11
13
to = coderd_template. dogfood
12
14
id = " 0d286645-29aa-4eaf-9b52-cc5d2740c90b"
You can’t perform that action at this time.
0 commit comments