Skip to content

Commit b22e0aa

Browse files
authored
docs: streamline getting started guide (#2302)
* docs: streamline getting started guide * docs: add apply screencast
1 parent 1ca00f9 commit b22e0aa

File tree

6 files changed

+70
-4
lines changed

6 files changed

+70
-4
lines changed

docs/ce/getting-started/with-opentofu.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ Then you can add a comment like `digger apply` and shortly after apply output wi
236236
</Steps>
237237

238238
## Demo repositories
239-
239+
- [OpenTofu demo repo](https://github.com/diggerhq/demo-opentofu)
240240
- [AWS demo repo](https://github.com/diggerhq/quickstart-actions-aws)
241241
- [GCP demo repo](https://github.com/diggerhq/demo-conftest-gcp/)
242242
- [Azure demo repo](https://github.com/diggerhq/azure-onboarding-test)

docs/ce/getting-started/with-terraform.mdx

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: "With Terraform"
55
In this tutorial, you will set up Digger to automate terraform pull requests using Github Actions
66

77
**Prerequisites**
8-
- A GitHub repository with valid terraform code
8+
- A GitHub repository with valid terraform code, don't have one? see [here](#demo-repositories)
99
- Your cloud provider credentials:
1010
- For AWS: [Hashicorp's AWS tutorial](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/aws-build)
1111
- For GCP: [Hashicorp's GCP tutorial](https://developer.hashicorp.com/terraform/tutorials/gcp-get-started/google-cloud-platform-build)
@@ -16,7 +16,11 @@ In this tutorial, you will set up Digger to automate terraform pull requests usi
1616

1717
Head to [ui.digger.dev](https://ui.digger.dev) and sign up using your preferred method.
1818

19-
You should see an empty dashboard after you sign up.
19+
Post sign up, your dashboard should look like this:
20+
21+
![](/images/readme/ui.digger.dev.png)
22+
23+
2024
</Step>
2125

2226
<Step title="Install the Digger GitHub App">
@@ -40,17 +44,52 @@ In GitHub repository settings, go to Secrets and Variables - Actions. Create the
4044
- `AWS_ACCESS_KEY_ID` - `AWS_SECRET_ACCESS_KEY` You can also [use
4145
OIDC](/ce/cloud-providers/authenticating-with-oidc-on-aws) for AWS
4246
authentication.
47+
48+
<Accordion title="Tip: Set GitHub Action secrets with gh CLI">
49+
From the repository root (with GitHub CLI installed):
50+
51+
```bash
52+
# Set AWS credentials as repository Action secrets
53+
gh secret set AWS_ACCESS_KEY_ID --body "$AWS_ACCESS_KEY_ID"
54+
gh secret set AWS_SECRET_ACCESS_KEY --body "$AWS_SECRET_ACCESS_KEY"
55+
```
56+
</Accordion>
4357
</Tab>
4458
<Tab title="GCP">
4559
- `GCP_CREDENTIALS` - contents of your GCP Service Account Key json file You
4660
can also [use OIDC](/gcp/federated-oidc-access/) for GCP authentication.
61+
62+
<Accordion title="Tip: Set GitHub Action secrets with gh CLI">
63+
If your Service Account key is saved to a file, you can pipe it directly:
64+
65+
```bash
66+
# Set GCP credentials secret from a JSON key file
67+
gh secret set GCP_CREDENTIALS < path/to/service-account-key.json
68+
```
69+
70+
Or set from an environment variable/string:
71+
72+
```bash
73+
gh secret set GCP_CREDENTIALS --body "$(cat path/to/service-account-key.json)"
74+
```
75+
</Accordion>
4776
</Tab>
4877
<Tab title="Azure">
4978
- `AZURE_CLIENT_ID` - Your Azure App Registration Client ID
5079
- `AZURE_TENANT_ID` - Your Azure Tenant ID
5180
- `AZURE_SUBSCRIPTION_ID` - Your Azure Subscription ID
5281

5382
You'll need to configure OIDC authentication by setting up federated credentials in your Azure App Registration. See [Azure OIDC setup](/ce/azure-specific/azure) for details.
83+
84+
<Accordion title="Tip: Set GitHub Action secrets with gh CLI">
85+
From the repository root (with GitHub CLI installed):
86+
87+
```bash
88+
gh secret set AZURE_CLIENT_ID --body "$AZURE_CLIENT_ID"
89+
gh secret set AZURE_TENANT_ID --body "$AZURE_TENANT_ID"
90+
gh secret set AZURE_SUBSCRIPTION_ID --body "$AZURE_SUBSCRIPTION_ID"
91+
```
92+
</Accordion>
5493
</Tab>
5594
</Tabs>
5695
</Step>
@@ -230,13 +269,25 @@ Terraform will run an existing plan against your code.
230269

231270
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.
232271

272+
273+
<Info>If you forked one of the demo repositories you will need to enable Actions in your repository.</Info>
233274
Then you can add a comment like `digger apply` and shortly after apply output will be added as comment too.
234-
</Step>
235275

276+
<video
277+
autoPlay
278+
muted
279+
loop
280+
playsInline
281+
className="w-full aspect-video rounded-xl"
282+
src="/videos/apply.mp4"
283+
></video>
284+
</Step>
236285
</Steps>
237286

238287
## Demo repositories
239288

240289
- [AWS demo repo](https://github.com/diggerhq/quickstart-actions-aws)
241290
- [GCP demo repo](https://github.com/diggerhq/demo-conftest-gcp/)
242291
- [Azure demo repo](https://github.com/diggerhq/azure-onboarding-test)
292+
293+
39.5 MB
Loading
186 KB
Loading

docs/readme/introduction.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,21 @@ description: "Digger is an open-source CI/CD orchestrator for Terraform"
88
- But then you end up duplicating your CI/CD infrastructure - compute, jobs, logs etc
99
- And you need to give it admin access to your cloud accounts
1010

11+
12+
13+
## Want to get started quickly?
14+
15+
<Card title="Quick Start" icon="lightbulb" href="/ce/getting-started/with-terraform">
16+
<p>
17+
Get started with Digger in minutes.
18+
</p>
19+
</Card>
20+
21+
22+
23+
24+
25+
1126
## Run Terraform in your CI
1227

1328
Digger spins up jobs in your existing CI instead of running its own CI-like infrastructure. This is:

docs/videos/apply.mp4

3.3 MB
Binary file not shown.

0 commit comments

Comments
 (0)