File tree 2 files changed +15
-2
lines changed
2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 17
17
- " flake.nix"
18
18
workflow_dispatch :
19
19
20
+ permissions :
21
+ # Necessary for GCP authentication (https://github.com/google-github-actions/setup-gcloud#usage)
22
+ id-token : write
23
+
20
24
jobs :
21
25
build_image :
22
26
if : github.actor != 'dependabot[bot]' # Skip Dependabot PRs
85
89
- name : Setup Terraform
86
90
uses : ./.github/actions/setup-tf
87
91
92
+ - name : Authenticate to Google Cloud
93
+ uses : google-github-actions/auth@v2
94
+ with :
95
+ workload_identity_provider : projects/573722524737/locations/global/workloadIdentityPools/github/providers/github
96
+ service_account : coder-ci@coder-dogfood.iam.gserviceaccount.com
97
+
88
98
- name : Terraform init and validate
89
99
run : |
90
100
cd dogfood
@@ -110,11 +120,12 @@ jobs:
110
120
cd dogfood
111
121
terraform apply -auto-approve
112
122
env :
113
- # Consumed by Coder CLI
123
+ # Consumed by coderd provider
114
124
CODER_URL : https://dev.coder.com
115
125
CODER_SESSION_TOKEN : ${{ secrets.CODER_SESSION_TOKEN }}
116
126
# Template source & details
117
127
TF_VAR_CODER_TEMPLATE_NAME : ${{ secrets.CODER_TEMPLATE_NAME }}
118
128
TF_VAR_CODER_TEMPLATE_VERSION : ${{ steps.vars.outputs.sha_short }}
119
129
TF_VAR_CODER_TEMPLATE_DIR : ./contents
120
130
TF_VAR_CODER_TEMPLATE_MESSAGE : ${{ steps.message.outputs.pr_title }}
131
+ 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