---
title: "Manage your Deno Deploy and Deno Subhosting projects with Terraform"
description: "Deno now ships an official Terraform provider (denoland/deno) for managing Deno Deploy and Deno Subhosting projects, custom domains and deployments as infrastructure-as-code."
url: "https://swe.quest/articles/manage-your-deno-deploy-and-deno-subhosting-projects-with-terraform-699764d70221ef58"
canonical: "https://deno.com/blog/terraform"
source: "Deno"
published: "2023-12-05"
difficulty: "medium"
kind: "How-to"
reading_minutes: 6
tags: ["infrastructure-as-code","serverless","deployment","typescript"]
---

# Manage your Deno Deploy and Deno Subhosting projects with Terraform

A post on [Deno](https://swe.quest/sources/deno.md), published 2023-12-05, 6 min read, How-to. Original: [https://deno.com/blog/terraform](https://deno.com/blog/terraform)

## Summary

Deno now ships an official Terraform provider (denoland/deno) for managing Deno Deploy and Deno Subhosting projects, custom domains and deployments as infrastructure-as-code. A walkthrough deploys a local TypeScript server with a static asset: configure the provider with an organization ID and token (or DENO\_DEPLOY\_ORGANIZATION\_ID/DENO\_DEPLOY\_TOKEN env vars), create a deno\_project, collect files via the deno\_assets data source with a root path and glob pattern, then define a deno\_deployment with an entry point and env vars. Running terraform plan and apply creates the resources, and terraform state show reveals the deployment's deno.dev URL. The provider is pitched as simpler than calling the Subhosting API directly when coordinating hundreds of projects.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Infrastructure as code](https://swe.quest/tags/infrastructure-as-code.md) (Infrastructure)
- [Serverless](https://swe.quest/tags/serverless.md) (Backend & APIs)
- [Deployment](https://swe.quest/tags/deployment.md) (Reliability & operations)
- [TypeScript](https://swe.quest/tags/typescript.md) (Languages)

## Prerequisites

- Terraform basics ([easy posts on Infrastructure as code](https://swe.quest/tags/infrastructure-as-code.md?difficulty=easy))

## Keywords

Terraform, Deno Deploy, Deno Subhosting, Deno Terraform Provider, Deno

## Related posts

- [Build Your Own Cloud IDE with the Subhosting API](https://swe.quest/articles/build-your-own-cloud-ide-with-the-subhosting-api-182e8468c60d1771.md): Deno · 2024-01-16 · Medium · 10 min read · Serverless, TypeScript, Developer tools, API design
  A cloud IDE can be built on the Deno Subhosting API, which programmatically deploys user code to Deno Deploy's global V8 isolate cloud within seconds.
- [Build and Ship Astro Sites with Deno and Deno Deploy](https://swe.quest/articles/build-and-ship-astro-sites-with-deno-and-deno-deploy-3be8936cebaf2b24.md): Deno · 2023-07-21 · Medium · 12 min read · Frontend, Serverless, Deployment, TypeScript
  Astro sites can be built with the Deno runtime and hosted on Deno Deploy in two modes.
- [Run npm and Deno anywhere](https://swe.quest/articles/run-npm-and-deno-anywhere-02ce4590033c3918.md): Deno · 2022-11-18 · Medium · 7 min read · Deployment, Containers, Cloud platforms, JavaScript
  Deno apps, including those using npm specifiers, can be containerized with the official denoland/deno Docker image and deployed to any VPS or container platform, not just Deno Deploy.
- [Introducing deployctl, the command line interface for Deno Deploy](https://swe.quest/articles/introducing-deployctl-the-command-line-interface-for-deno-deploy-f471a4c6be1d0b1b.md): Deno · 2024-03-15 · Medium · 9 min read · Deployment, Serverless, Developer tools, TypeScript
  deployctl is a CLI for managing the full lifecycle of Deno Deploy projects from the terminal: deploying, renaming projects, inspecting deployments, streaming logs, monitoring resource usage with \`deployctl top\`, promoting preview deployments to production, and deleting deployments or projects.
- [Build a dinosaur runner game with Deno, pt. 1](https://swe.quest/articles/build-a-dinosaur-runner-game-with-deno-pt-1-e4d3faa91fec67fd.md): Deno · 2025-12-08 · Medium · 5 min read · JavaScript, TypeScript, Deployment, Serverless
  Part one of a series building a browser dinosaur runner game sets up a Deno project that serves static files and deploys it.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
