hello-terraform-cloudgov

May 22, 2025 ยท View on GitHub

A TTS-flavored Copier template for creating and maintaining a Terraform module that deploys of a set of applications onto cloud.gov

Why this project

This template supports scaffolding and maintaining a Terraform module that will deploy a set of applications onto cloud.gov, configured to the local tastes of TTS.

It's usable standalone, but you'll have to explicitly answer questions about your system and applications. It's really intended to be used in composition with other GSA-TTS/hello-* templates which specify those answers for this template.

Status

The resulting Terraform module can be bootstrapped. However, applying the module to create apps, services, etc does not yet work.

Features

  • Provides utilities for bootstrapping Terraform state into a cloud.gov S3 bucket
  • Deploys to either your unmanaged sandbox space, or to managed staging and production spaces

Requirements

  • uv (for running Copier)
  • git

Usage

Creating a system module

  1. Install uv (if you haven't already)
  2. Generate a new project...
    ...from your local clone of the repository:
    uvx copier copy --trust ./hello-terraform-cloudgov <destination-folder>
    
    ...or directly from the repository on GitHub:
    uvx copier copy --trust gh:GSA-TTS/hello-terraform-cloudgov <destination-folder>
    
  3. Answer the prompts:
    • Name the system
    • Enable space management, if you have a target org
    • Describe your applications, using JSON

Updating the module later

If you'd like to...

  • change your answers or
  • incorporate improvements made after you copied this template

...you can run the Copier update command:

  1. Make sure that your destination folder contains no uncommitted changes
  2. Update your destination folder from the template
    uvx copier update --trust <destination-folder>
    

To learn how updating works and what additional options are available, read the Copier update documentation .

Tasks

After copying, the following tasks are run automatically in the destination folder:

  • git init .

Follow instructions in the README.md in the destination folder to work with the new module.

Directory Structure

  • templates/terraform/: Template for the module, with an included standalone module for bootstrapping Terraform state into an S3 bucket.

Contributing

See CONTRIBUTING for additional information.

Public domain

This project is in the worldwide public domain. As stated in CONTRIBUTING:

This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.

All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.