Skip to content
This repository was archived by the owner on Aug 18, 2025. It is now read-only.

Commit 0dabe94

Browse files
author
Katie Horne
authored
add guide for Terraform (#624)
1 parent 6755f28 commit 0dabe94

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

guides/deployments/terraform.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
title: Terraform
3+
description: Learn how to deploy Coder using Terraform.
4+
---
5+
6+
Coder offers [Terraform modules](https://github.com/cdr/enterprise-terraform)
7+
that help you deploy Coder faster.
8+
9+
Currently, we offer a single-command deployment of Coder to Google Cloud
10+
Platform. We will add support for additional cloud providers in the future.
11+
12+
## Deploying Coder to Google Cloud Platform
13+
14+
> Before proceeding, please make sure that you have both
15+
> [Terraform](https://www.terraform.io/downloads.html) and
16+
> [Terragrunt](https://terragrunt.gruntwork.io/docs/getting-started/quick-start/)
17+
> installed.
18+
19+
1. [Copy the GKE example](https://github.com/cdr/enterprise-terraform/tree/main/examples/gke/self-hosted)
20+
to the location of your choice (we recommend version controlling the entire
21+
folder).
22+
23+
1. [Create a cloud DNS zone](https://cloud.google.com/dns/docs/quickstart)
24+
containing your desired hostname. This must be in the same GCP project where
25+
you will deploy Coder.
26+
27+
1. Update the `terragrunt.hcl` file that's included in the root of your example
28+
folder. The `terragrunt.hcl` file contains notes that will guide you through
29+
customization options available. When done, you can view the changes you
30+
proposed running:
31+
32+
```console
33+
terragrunt run-all plan
34+
```
35+
36+
If you run the above command and it fails, you may have misconfigured one or
37+
more of the variables required. The output will direct you to the problematic
38+
areas.
39+
40+
1. Deploy Coder by running:
41+
42+
```console
43+
terragrunt run-all apply
44+
```
45+
46+
If the `apply` command succeeds, you will be able to access Coder at the
47+
hostname you provided. Log in with `admin` as the username and the password
48+
that you're provided.
49+
50+
## Tear down
51+
52+
To tear down your Coder deployment, run:
53+
54+
```console
55+
terragrunt run-all destroy
56+
```

manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,9 @@
360360
},
361361
{
362362
"path": "./guides/deployments/teardown.md"
363+
},
364+
{
365+
"path": "./guides/deployments/terraform.md"
363366
}
364367
]
365368
},

0 commit comments

Comments
 (0)