Terraspace: The Terraform Framework

Terraspace is a Terraform Framework that optimizes for infrastructure-as-code happiness. It provides an organized structure, conventions over configurations, keeps your code DRY, and adds convenient tooling. Terraspace makes working with Terraform easier and more fun.

The Code

Easy to learn


Commands

terraspace new project
terraspace new module
terraspace new stack
terraspace seed
terraspace build
terraspace up
terraspace down
terraspace all up
terraspace summary
terraspace test

Structure

├── app
│   ├── modules
│   │   ├── instance
│   │   ├── rds
│   │   ├── security_group
│   │   └── vpc
│   └── stacks
│       ├── app
│       ├── vpc
│       └── instance
└── config
    └── terraform
        ├── backend.tf
        └── provider.tf

Generators

$ terraspace new stack demo
=> Creating new stack called demo.
      create  app/stacks/demo
      create  app/stacks/demo/main.tf
      create  app/stacks/demo/outputs.tf
      create  app/stacks/demo/variables.tf
$

Testing

$ terraspace test
main
Building test harness...
Test harness built: /tmp/terraspace-test-harnesses/network
=> terraspace up example -y
=> terraform apply -auto-approve
Apply complete! Resources: 2 added, 0 changed, 0 destroyed.
  successful deploy
=> terraspace down example -y
=> terraform destroy -auto-approve
Destroy complete! Resources: 2 destroyed.

Finished in 30.21 seconds (files took 0.29861 seconds to load)
1 example, 0 failures
$

Deploy

$ terraspace up demo -y
Building .terraspace-cache/us-west-2/dev/stacks/demo
Built in .terraspace-cache/us-west-2/dev/stacks/demo
Current directory: .terraspace-cache/us-west-2/dev/stacks/demo
=> terraform apply -auto-approve
Apply complete! Resources: 2 added, 0 changed, 0 destroyed.
network_id = projects/tung-111222/global/networks/duck
$

Destroy

$ terraspace down demo -y
Building .terraspace-cache/us-west-2/dev/stacks/demo
Built in .terraspace-cache/us-west-2/dev/stacks/demo
Current directory: .terraspace-cache/us-west-2/dev/stacks/demo
=> terraform destroy -auto-approve
Destroy complete! Resources: 2 destroyed.
$

Quick Start Video

Terraspace Quick Start

A quick start demo that takes only a few minutes. In this "Getting Started with Terraspace" video, we'll show you how quick and easy it is to use Terraspace.

Learn More

Quick Start