Giter Club home page Giter Club logo

tfd's Introduction

tfd

OpenSSF Best Practices

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
tfd upload-config --path /path/to/project --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

tfd <subcommand> --help for more info

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 install github.com/logandavies181/tfd/v2@latest

Or check out releases

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, run goreleaser release

tfd's People

Contributors

logandavies181 avatar tangyfruits avatar logankwb avatar

Stargazers

Oliver W avatar  avatar  avatar kunal avatar Tony Jenness avatar Feilong Wang avatar  avatar Gerard C Roig avatar  avatar  avatar  avatar  avatar sheldonhull avatar  avatar  avatar Adrian avatar  avatar Donald Tang avatar  avatar Paul McKeown avatar Yu Liu avatar

Watchers

 avatar  avatar

Forkers

tangyfruits

tfd's Issues

unknown flag: --auto-approve

Use tfd latest version: v1.1.0
Referring README to run below command. It shows unknown flag: --auto-approve. Is it actual auto-apply ?

image

If tfd is waiting for completion of an `apply` that fails, tfd does not report an error

It would be useful if tfd returned a non-zero error code if any terraform operation it is waiting for completes with errors.

For example the following tfd run returned with code 0 and reported the wrong number of changes:

$ tfd run start --auto-apply
run-aaaaaaaaaa
Plan plan-bbbbbbbbb running. Waiting for it to finish..
Plan: 22 to add, 1 to change, 39 to destroy.
Run confirmed
Waiting for apply..
Run finished
Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

The actual result in terraform was:

  • Apply errored, 19 created, 38 destroyed.

(running tfd 1.1.1)

Empty readme

It would be nice to have some kind of description of what the tool can / can't do and how to use it

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.