terrarium

command module
v0.0.0-...-8083537 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2021 License: ISC Imports: 4 Imported by: 0

README

Terrarium

Mutexed file sync backed by S3. Designed for painless state management in CI or other ephemeral filesystems.

Usage

Here is an example of persisting Terraform state in a S3 bucket:

# Security credentials must be set as environment variables.
export AWS_ACCESS_KEY="..."
export AWS_SECRET_KEY="..."

# Lock and download the 'terraform-nginx' directory in the 'us-east-1'
# region bucket'my-bucket' S3 for a maximum of 10 minutes.
terrarium -expires=600 \
  -s3-bucket=my-bucket \
  -s3-region=us-east-1 \
  lock terraform-nginx

# Work with the state locally within the 'terraform-nginx/state/' directory.
terraform apply \
  -auto-approve \
  -state=terraform-nginx/state/terraform.tfstate

# Upload state and unlock the directory in S3.
terrarium -s3-bucket=my-bucket \
  -s3-region=us-east-1 \
  commit terraform-nginx

Install

Terrarium may be installed directly from the source repository on a system with Go 1.16 or higher, and may be done like so:

go install github.com/evantbyrne/terrarium@latest

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL