tfd

command module
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: MPL-2.0 Imports: 5 Imported by: 0

README

tfd

Terraform Developer tool for interacting with Terraform Cloud and Terraform Enterprise

Usage

# Set Terraform Cloud Token https://www.terraform.io/docs/cloud/users-teams-organizations/api-tokens.html
export TFD_TOKEN=xxx
export TFD_ORG=myorg
# List workspaces that you have access to in the current Org
tfd list-workspaces

# Upload local git repo to Terraform Cloud and set the Terraform Working Directory to the path, relative to git root
tfd upload-config --path /path/to/terraform/dir --workspace myworkspace

# Start a run
tfd run start --workspace myworkspace

# Start a run and auto approve it once it is ready
tfd run start --workspace myworkspace --auto-apply

# Start a destroy run
tfd run destroy --workspace myworkspace

# Apply the current run that is waiting for approval
tfd run apply --workspace myworkspace

# Stop queued runs and the current run
tfd run stop --workspace myworkspace

Configure

Each of the command-line options can be read from environment variables, config file (default: ~/.tfd.yaml) or as command-line options. Environment variables are prefixed with "TFD_"

Install

go get github.com/logandavies181/tfd@latest

Or check out releases

Mac/Windows builds can be added on request.

Contributing

Feel free to raise a PR or create an issue

Developing

Ensure you have an up-to-date go compiler.

Before raising a Pull Request, ensure the unit tests pass and that the mocks are up to date by running generate_mocks.sh

To create a release, create a semver tag (e.g. v1.2.3) and run release.sh <new_tag_version. This will ensure the version gets added to the build and binaries are published to GitHub.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
git
run
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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