Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/ce/getting-started/with-opentofu.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ Then you can add a comment like `digger apply` and shortly after apply output wi
</Steps>

## Demo repositories

- [OpenTofu demo repo](https://github.com/diggerhq/demo-opentofu)
- [AWS demo repo](https://github.com/diggerhq/quickstart-actions-aws)
- [GCP demo repo](https://github.com/diggerhq/demo-conftest-gcp/)
- [Azure demo repo](https://github.com/diggerhq/azure-onboarding-test)
57 changes: 54 additions & 3 deletions docs/ce/getting-started/with-terraform.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: "With Terraform"
In this tutorial, you will set up Digger to automate terraform pull requests using Github Actions

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

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

You should see an empty dashboard after you sign up.
Post sign up, your dashboard should look like this:

![](/images/readme/ui.digger.dev.png)


</Step>

<Step title="Install the Digger GitHub App">
Expand All @@ -40,17 +44,52 @@ In GitHub repository settings, go to Secrets and Variables - Actions. Create the
- `AWS_ACCESS_KEY_ID` - `AWS_SECRET_ACCESS_KEY` You can also [use
OIDC](/ce/cloud-providers/authenticating-with-oidc-on-aws) for AWS
authentication.

<Accordion title="Tip: Set GitHub Action secrets with gh CLI">
From the repository root (with GitHub CLI installed):

```bash
# Set AWS credentials as repository Action secrets
gh secret set AWS_ACCESS_KEY_ID --body "$AWS_ACCESS_KEY_ID"
gh secret set AWS_SECRET_ACCESS_KEY --body "$AWS_SECRET_ACCESS_KEY"
```
</Accordion>
</Tab>
<Tab title="GCP">
- `GCP_CREDENTIALS` - contents of your GCP Service Account Key json file You
can also [use OIDC](/gcp/federated-oidc-access/) for GCP authentication.

<Accordion title="Tip: Set GitHub Action secrets with gh CLI">
If your Service Account key is saved to a file, you can pipe it directly:

```bash
# Set GCP credentials secret from a JSON key file
gh secret set GCP_CREDENTIALS < path/to/service-account-key.json
```

Or set from an environment variable/string:

```bash
gh secret set GCP_CREDENTIALS --body "$(cat path/to/service-account-key.json)"
```
</Accordion>
</Tab>
<Tab title="Azure">
- `AZURE_CLIENT_ID` - Your Azure App Registration Client ID
- `AZURE_TENANT_ID` - Your Azure Tenant ID
- `AZURE_SUBSCRIPTION_ID` - Your Azure Subscription ID

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.

<Accordion title="Tip: Set GitHub Action secrets with gh CLI">
From the repository root (with GitHub CLI installed):

```bash
gh secret set AZURE_CLIENT_ID --body "$AZURE_CLIENT_ID"
gh secret set AZURE_TENANT_ID --body "$AZURE_TENANT_ID"
gh secret set AZURE_SUBSCRIPTION_ID --body "$AZURE_SUBSCRIPTION_ID"
```
</Accordion>
</Tab>
</Tabs>
</Step>
Expand Down Expand Up @@ -230,13 +269,25 @@ Terraform will run an existing plan against your code.

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.


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

<video
autoPlay
muted
loop
playsInline
className="w-full aspect-video rounded-xl"
src="/videos/apply.mp4"
></video>
</Step>
</Steps>

## Demo repositories

- [AWS demo repo](https://github.com/diggerhq/quickstart-actions-aws)
- [GCP demo repo](https://github.com/diggerhq/demo-conftest-gcp/)
- [Azure demo repo](https://github.com/diggerhq/azure-onboarding-test)


Binary file added docs/images/readme/digger-apply.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/readme/ui.digger.dev.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions docs/readme/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@ description: "Digger is an open-source CI/CD orchestrator for Terraform"
- But then you end up duplicating your CI/CD infrastructure - compute, jobs, logs etc
- And you need to give it admin access to your cloud accounts



## Want to get started quickly?

<Card title="Quick Start" icon="lightbulb" href="/ce/getting-started/with-terraform">
<p>
Get started with Digger in minutes.
</p>
</Card>






## Run Terraform in your CI

Digger spins up jobs in your existing CI instead of running its own CI-like infrastructure. This is:
Expand Down
Binary file added docs/videos/apply.mp4
Binary file not shown.
Loading