You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Head to [ui.digger.dev](https://ui.digger.dev) and sign up using your preferred method.
15
+
16
+
You should see onboarding screen after you sign up, which guides you to install the github app and perform the next steps
17
+
18
+
# Step 2: install the Digger GitHub App
19
+
20
+
Install the Digger [GitHub App](https://github.com/apps/digger-pro) into your repository.
12
21
13
22
<Note>
14
23
Digger GitHub App does not need access to your cloud account, it just starts jobs in your CI. All sensitive data stays in your CI job.
@@ -17,14 +26,14 @@ You can also [self-host Digger orchestrator](/ce/self-host/deploy-docker) with a
17
26
18
27
</Note>
19
28
20
-
# Create Action Secrets with AWS credentials (you can also [use OIDC](/ce/cloud-providers/authenticating-with-oidc-on-aws))
29
+
# Step 3: Create Action Secrets with AWS credentials (you can also [use OIDC](/ce/cloud-providers/authenticating-with-oidc-on-aws)
21
30
22
31
In GitHub repository settings, go to Secrets and Variables - Actions. Create the following secrets:
23
32
24
33
-`AWS_ACCESS_KEY_ID`
25
34
-`AWS_SECRET_ACCESS_KEY`
26
35
27
-
# Create digger.yml
36
+
# Step 4: Create digger.yml
28
37
29
38
This file contains Digger configuration and needs to be placed at the root level of your repository. Assuming your terraform code is in the `prod` directory:
30
39
@@ -34,7 +43,7 @@ projects:
34
43
dir: prod
35
44
```
36
45
37
-
# Create Github Actions workflow file
46
+
# Step 5: Create Github Actions workflow file
38
47
39
48
Place it at `.github/workflows/digger_workflow.yml` (name is important!)
40
49
@@ -78,7 +87,7 @@ jobs:
78
87
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79
88
```
80
89
81
-
# Create a PR to verify that it works
90
+
# Step 6: Create a PR to verify that it works
82
91
83
92
Terraform will run an existing plan against your code.
Copy file name to clipboardExpand all lines: docs/ce/getting-started/github-actions-and-gcp.mdx
+15-6Lines changed: 15 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,16 @@ In this tutorial, you will set up Digger to automate terraform pull requests usi
8
8
9
9
- A GitHub repository with valid terraform code. Here's a [demo repo](https://github.com/diggerhq/demo-conftest-gcp/) for inspiration.
10
10
- A GCP Service Account Key json file. See [Hashicorp's GCP tutorial](https://developer.hashicorp.com/terraform/tutorials/gcp-get-started/google-cloud-platform-build)
Head to [ui.digger.dev](https://ui.digger.dev) and sign up using your preferred method.
15
+
16
+
You should see onboarding screen after you sign up, which guides you to install the github app and perform the next steps
17
+
18
+
# Step 2: install the Digger GitHub App
19
+
20
+
Install the Digger [GitHub App](https://github.com/apps/digger-pro) into your repository.
12
21
13
22
<Note>
14
23
Digger GitHub App does not need access to your cloud account, it just starts jobs in your CI. All sensitive data stays in your CI job.
@@ -17,13 +26,13 @@ You can also [self-host Digger orchestrator](/self-host/deploy-docker) with a pr
17
26
18
27
</Note>
19
28
20
-
# Create Action Secrets
29
+
# Step 3: Create Action Secrets
21
30
22
31
In GitHub repository settings, go to Secrets and Variables - Actions. Create the following secrets:
23
32
24
-
-`GCP_CREDENTIALS` - contents of your GCP Service Account Key json file. You can also [use OIDC](/gcp/federated-oidc-access/))
33
+
-`GCP_CREDENTIALS` - contents of your GCP Service Account Key json file. You can also [use OIDC](/ce/gcp/federated-oidc-access/)
25
34
26
-
# Create digger.yml
35
+
# Step 4: Create digger.yml
27
36
28
37
This file contains Digger configuration and needs to be placed at the root level of your repository. Assuming your terraform code is in the `prod` directory:
29
38
@@ -33,7 +42,7 @@ projects:
33
42
dir: prod
34
43
```
35
44
36
-
# Create Github Actions workflow file
45
+
# Step 5: Create Github Actions workflow file
37
46
38
47
Place it at `.github/workflows/digger_workflow.yml` (name is important!)
39
48
@@ -93,7 +102,7 @@ This file defines a workflow with 5 steps:
93
102
- Verify that GCP is configured correctly by running `gcloud info`
94
103
- Run Digger.
95
104
96
-
# Create a PR to verify that it works
105
+
# Step 6: Create a PR to verify that it works
97
106
98
107
Make any change to your terraform code e.g. add a blank line. An action run should start (you can see log output in Actions). After some time you should see output of Terraform Plan added as a comment to your PR:
0 commit comments