• Stars
    star
    673
  • Rank 67,060 (Top 2 %)
  • Language
    Ruby
  • License
    Apache License 2.0
  • Created over 4 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Terraspace: The Terraform Framework

Terraspace

Gem Version

BoltOps Badge

BoltOps Learn Badge

The Terraform Framework.

Official Docs Site: terraspace.cloud

Support the Project

  • Please watch/star this repo to help grow and support the project.
  • Consider subscribing to BoltOps Learn. You'll get access to many training videos. Subscribing helps support the project.

Quick Start

Watch the video

Here are commands to get started:

terraspace new project infra --plugin aws --examples
cd infra
terraspace up demo
terraspace down demo
  • The new command generates a starter project.
  • The up command creates an s3 bucket.
  • The down command cleans up and deletes the bucket.

The default plugin is aws. Major cloud providers are supported: aws, azurerm, google.

Usage

Create infrastructure:

$ terraspace up demo
Building .terraspace-cache/us-west-2/dev/stacks/demo
Current directory: .terraspace-cache/us-west-2/dev/stacks/demo
=> terraform init -get >> /tmp/terraspace/log/init/demo.log
=> terraform apply
Apply complete! Resources: 2 added, 0 changed, 0 destroyed.
$

Destroy infrastructure:

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

Deploy Multiple Stacks

To deploy all the infrastructure stacks:

$ terraspace all up
Will run:
    terraspace up vpc      # batch 1
    terraspace up mysql    # batch 2
    terraspace up redis    # batch 2
    terraspace up instance # batch 3
Are you sure? (y/N)

To choose multiple stacks to deploy

$ terraspace all up mysql redis
Will run:
    terraspace up vpc   # batch 1
    terraspace up mysql # batch 2
    terraspace up redis # batch 2
Are you sure? (y/N)

When you use the all command, the dependency graph is calculated and the stacks are deployed in the right order.

Terrafile

Terraspace makes it easy to use Terraform modules sourced from your own git repositories, other git repositories, or the Terraform Registry. Use any module you want:

Terrafile:

# GitHub repo
mod "s3", source: "boltops-tools/terraform-aws-s3", tag: "v0.1.0"
# Terraform registry
mod "sg", source: "terraform-aws-modules/security-group/aws", version: "3.10.0"

To install modules:

terraspace bundle

Features

  • DRY: You can keep your code DRY. Terraspace builds your Terraform project with common app and config/terraform structure that gets built each deploy. You can override the settings if needed, like for using existing backends. See: Existing Backends.
  • Generators: Built-in generators to quickly create the starter module. Focus on code instead of boilerplate structure.
  • Multiple Environments: Tfvars & Layering allow you to the same code with different tfvars to create multiple environments. Terraspace conventionally loads tfvars from the tfvars folder. Rich layering support allows you to build different environments like dev and prod with the same code. Examples are in Full Layering.
  • Deploy Multiple Stacks: The ability to deploy multiple stacks with a single command. Terraspace calculates the dependency graph and deploys stacks in the right order. You can also target specific stacks and deploy subgraphs.
  • Secrets Support: Terraspace has built-in secrets support for AWS Secrets Manager, AWS SSM Parameter Store, Azure Key Vault, Google Secrets Manager. Easily set variables from Cloud secrets providers.
  • Terrafile: Terraspace makes it easy to use Terraform modules sourced from your own git repositories, other git repositories, or the Terraform Registry. The git repos can be private or public. This is an incredibly powerful feature of Terraspace because it opens up a world of modules for you to use. Use any module you want.
  • Configurable CLI: Configurable CLI Hooks and CLI Args allow you to adjust the underlying terraform command.
  • Testing: A testing framework that allows you to create test harnesses, deploy real-resources, and have higher confidence that your code works.
  • Terraform Cloud and Terraform Enterprise Support: TFC and TFE are both supported. Terraspace adds additional conveniences to make working with Terraform Cloud Workspaces easier.
  • Terraspace Cloud Support: Terraspace Cloud adds additional features and conveniences like a Dashboard, History, Team Management, Permissions, Real-time Logging, and Cost Estimates. It's specifically designed for Terraspace. You might also be interested in this blog post: Terraspace Cloud Intro

Comparison

Here are some useful comparisons to help you compare Terraspace vs other tools in the ecosystem:

More info: terraspace.cloud

More Repositories

1

jets

Ruby on Jets
Ruby
2,438
star
2

ufo

AWS ECS Deployment Tool
Ruby
219
star
3

kubes

kubes
Ruby
99
star
4

dynomite

A simple wrapper library to make DynamoDB usage a little more friendly
Ruby
52
star
5

lono

Lono CloudFormation Framework
Ruby
50
star
6

aws-inventory

aws inventory tool
Ruby
47
star
7

sonic

Multi-functional tool to manage AWS infrastructure
Ruby
27
star
8

jack

Wrapper tool to manage AWS Elastic Beanstalk environments
Ruby
26
star
9

aws-mfa-secure

AWS MFA Secure Session for CLI and SDK
Ruby
23
star
10

puma-cloudwatch

Puma plugin sends puma metrics to CloudWatch
Ruby
20
star
11

cody

Powerful DSL to easily create and manage AWS CodeBuild projects
Ruby
19
star
12

pipedream

Beautiful and Powerful DSL Tool to Easily Create AWS CodePipeline Pipelines Quickly
Ruby
14
star
13

terragrunt-vs-terraform-reusable-module

example terragrunt and terraspace projects to explain difference between reusable modules
HCL
10
star
14

jets-gems

Manages pre-compiled Lambda Gems for Jets Ruby Serverless Framework
Ruby
8
star
15

aws-logs

Tail AWS CloudWatch Logs
Ruby
7
star
16

sentry-jets

Sentry exception report support for Jets
Ruby
6
star
17

kustomize-examples

Kustomize Simple Examples: Multiple Environments like dev and prod
6
star
18

terraspace-graph-demo

Demonstrates how Terraspace is able to build the dependency graph and deploy multiple stacks at once
HCL
5
star
19

terraspace-dockerfiles

Terraspace Dockerfiles
Shell
4
star
20

jetpacker

jetpacker
Ruby
3
star
21

terraspace-bundler

Terraform bundler
Ruby
3
star
22

cli-format

Format cli output in different ways: tab, table, csv, json, etc
Ruby
3
star
23

kubectl-examples

Kubectl Kubernetes Examples
Shell
3
star
24

terraspace-demo-terrafile

Terraspace Terrafile Example Demo
HCL
2
star
25

terraspace-aws-vpc

Terraspace Project with Example AWS VPC
HCL
2
star
26

terraspace-azurerm-linux-vm

Terraspace project with example Azure Linux Virtual Machine
HCL
2
star
27

hcl_parser

HCL Parser
Ruby
2
star
28

helm-examples

Helm Kubernetes Examples
Smarty
2
star
29

homebrew-software

BoltOps Homebrew Software
Ruby
2
star
30

terraspace-docs

Terraspace Docs
JavaScript
2
star
31

terraspace-aws-eks

Terraspace project with example AWS EKS Cluster
HCL
2
star
32

rspec-terraspace

Terraspace RSpec support
Ruby
2
star
33

s3-secure

S3 Bucket security hardening tool
Ruby
2
star
34

terraspace-aws-iam

Terraspace project with example AWS IAM resources
HCL
2
star
35

kubes_aws

Kubes AWS Helpers Library
Ruby
2
star
36

terraspace-google-vm

Terraspace project with example Google VM
HCL
1
star
37

terraspace-aws-elb

Terraspace AWS ELB Example
HCL
1
star
38

kubes_google

Kubes Google Helpers Library
Ruby
1
star
39

cfn_response

CfnResponse makes it easier to build and send the CloudFormation Custom Resource response
Ruby
1
star
40

terraspace-aws-ec2

Terraspace project with example AWS EC2 Instance
HCL
1
star
41

jets-docs

Jets Docs
JavaScript
1
star
42

airbrake-jets

Airbrake exception report support for Jets
Ruby
1
star
43

azure_check

Check Azure access
Ruby
1
star
44

terraspace_plugin_aws

Terraspace AWS Provider
Ruby
1
star
45

terraspace-aws-rds

HCL
1
star
46

terraspace-azurerm-network

Terraspace project with example Azure network
HCL
1
star
47

terraspace-azurerm-aks

Terraspace project with example Azure AKS Kubernetes Cluster
HCL
1
star
48

serverlessgems

serverlessgems
Ruby
1
star
49

terraspace-demo-module-test

Terraspace module test demo
Ruby
1
star
50

terraspace-google-gke

Terraspace project with example Google GKE Kubernetes Cluster
HCL
1
star
51

terraspace_plugin_azurerm

Terraspace Azurerm Provider
Ruby
1
star
52

terraspace-aws-rds-aurora

Terraspace project with example AWS RDS Aurora Database
HCL
1
star
53

azure_info

Azure info: Simple library to get current subscription, resource group, and location, etc
Ruby
1
star
54

importmap-jets

JavaScript
1
star
55

terraspace-google-network

Terraspace project with Example Google Network
HCL
1
star
56

google_check

Simple script to check google access with GOOGLE_APPLICATION_CREDENTIALS
Ruby
1
star
57

terraform-workshop-aws

Simple Terraform Workshop for AWS
HCL
1
star
58

terraspace_plugin_google

Terraspace Google Cloud Provider
Ruby
1
star
59

terraspace-aws-security-group

Terraspace project with example AWS Security Group Module
HCL
1
star
60

terraform-aws-s3

Terraform s3 example module
HCL
1
star
61

glb

Ruby
1
star
62

google-ssl

Google Cloud Function SSL Cert Rotation Tool
Python
1
star
63

libcurl

Gem tells serverlessgems to build the gem package with libcurl
Ruby
1
star
64

terraspace-azurerm-windows-vm

Terraspace project with example Azure Windows Virtual Machine
HCL
1
star
65

armrest

Ruby
1
star