## Summary The DigitalOcean template builder base declared Terraform `variable` blocks for `project_uuid` and `ssh_key_id` that the template builder never filled. `project_uuid` was required with no default, so the build broke with no way to supply a value from the wizard (DEVEX-591). This brings the DigitalOcean base to parity with the GCP bases fixed in #27015: - Declare `project_uuid` (required) and `ssh_key_id` (optional, default `0`) in `base.json` so the wizard prompts for them on the first step. - Inject the entered values via `default = {{ .Variables.* }}` in `main.tf.tmpl`, keeping the existing `variable` blocks and validation. - Drop the `sensitive` flags. The variable-injection path (`mergeBaseVariables`, `DefaultBaseRenderContext`, and the snapshot test helper) skips sensitive variables, so a sensitive base variable renders empty. A project UUID / SSH key ID are not secrets. - Update the README now that the values are prompted rather than manually edited. - Regenerate the `digitalocean-linux.tf.golden` snapshot. ## Testing - `go test ./coderd/templatebuilder/` <img width="1048" height="616" alt="Screenshot 2026-07-15 at 12 44 42 PM" src="https://github.com/user-attachments/assets/89e334ca-e904-4387-9264-6ed1614a40ba" /> <details> <summary>Audit of all template builder bases for unfilled variables</summary> | Base | Variable status | Verdict | |------|-----------------|---------| | aws-linux | no HCL `variable` blocks; provider env auth | OK | | aws-windows | same | OK | | azure-linux | same | OK | | **digitalocean-linux** | `project_uuid` (required, no default) + `ssh_key_id`; absent from `base.json` | **Fixed here** | | docker | `docker_socket` has `default = ""`; `container_image` via `{{ .Variables }}` + declared | OK | | gcp-linux | fixed in #27015 | OK | | gcp-windows | fixed in #27015 | OK | | kubernetes | `namespace` (required), `use_kubeconfig`, `container_image` all via `{{ .Variables }}` + declared | OK | | scratch | no variables | OK | DigitalOcean was the only broken base; all others either have safe defaults or already declare their variables. **Mechanism note:** `base.json` `variables[]` drives the first-step prompts and values are injected as HCL literals via `{{ .Variables.<name> }}` (strings quoted, numbers/bools raw; supported types: string, number, bool). Sensitive/computed variables are intentionally skipped everywhere the injection map is built, so they cannot currently be injected. That is why the `sensitive` flags were removed here. </details> --- *This PR was generated by Coder Agents on behalf of @jeremyruppel.*
display_name, description, icon, maintainer_github, verified, tags
| display_name | description | icon | maintainer_github | verified | tags | |||
|---|---|---|---|---|---|---|---|---|
| DigitalOcean Droplet (Linux) | Provision DigitalOcean Droplets as Coder workspaces | ../../../site/static/icon/do.png | coder | true |
|
Remote Development on DigitalOcean Droplets
Provision DigitalOcean Droplets as Coder workspaces with this example template.
Prerequisites
To deploy workspaces as DigitalOcean Droplets, you'll need:
-
DigitalOcean personal access token (PAT)
-
DigitalOcean project ID, which the template builder prompts for. You can get your project information via the
doctlCLI by runningdoctl projects list. -
Optional: DigitalOcean SSH key ID, which the template builder prompts for (obtain via the
doctlCLI by runningdoctl compute ssh-key list).- Note that this is only required for Fedora images to work. Leave it as
0if you don't need it.
- Note that this is only required for Fedora images to work. Leave it as
Authentication
This template assumes that the Coder Provisioner is run in an environment that is authenticated with Digital Ocean.
Obtain a Digital Ocean Personal Access Token and set the DIGITALOCEAN_TOKEN environment variable to the access token.
For other ways to authenticate consult the Terraform provider's docs.
Architecture
This template provisions the following resources:
- DigitalOcean VM (ephemeral, deleted on stop)
- Managed disk (persistent, mounted to
/home/coder)
This means, when the workspace restarts, any tools or files outside of the home directory are not persisted. To pre-bake tools into the workspace (e.g. python3), modify the VM image, or use a startup script.
Note
This template is designed to be a starting point! Edit the Terraform to extend the template to support your use case.