Giter Club home page Giter Club logo

tftools's Introduction

logo

tftools

Easy CLI with useful terraform/terragrunt tools

Build with ❤ in Golang

Go report card GitHub code size in bytes GitHub go.mod Go version

Table of Contents generated with DocToc

Badges

Release Status Build Status Git Leaks Status Lint Status Gosec Status Test Status License Release GitHub Releases Stats

Tftools summarize

The concern is: I have a lot of changes in terraform and I need a clear way of the concepts that are going to be deleted|changed|created only with the resource address. It can be messy to have a super tf plan output when there are many changes.

Installation

Install latest version

curl --proto '=https' --tlsv1.2 -sSfL https://raw.githubusercontent.com/containerscrew/tftools/main/scripts/install.sh | sh

Install specific release

curl --proto '=https' --tlsv1.2 -sSfL https://raw.githubusercontent.com/containerscrew/tftools/main/scripts/install.sh | sh -v "v0.8.0"

Note

If you don't specify -v flag, by default will install always latest version.

Container image

In this other repo I have a container image where you can find this tool tftools installed.

https://hub.docker.com/r/containerscrew/infratools/

Take a look inside install documentation for other installation methods.

Usage

Take a look inside docs usage

Built-in subcommand

tftools usage is subcommand that prints the contents of usage.md in pretty terminal markdown render

tftools usage

Requires internet connectivity, as it fetches the usage.md file.

Example

example

This summarized output can be useful, for example, for:

  • You are migrating a terraform module and there are many changes that may be important in terms of destroying/creating resources (e.g., if you are migrating an EKS module from v17.X to v19.X).
  • You use GitOps and deploy terraform from pipeline. The pipeline that makes the terraform plan can always show a summary of what is going to change (instead of having a super output of the original terraform plan).

TO DO

  • Improve error handling
  • Add tests, although I have no experience
  • Code refactor is certainly needed!
  • Create new subcommand for an interative terraform state mv target migration (when you need to move a lot of resources)
  • Other subcommand when you need to apply only certain targets (terraform apply -target=x -target=x ...)

Contribution

Pull requests are welcome! Any code refactoring, improvement, implementation.

LICENSE

LICENSE

tftools's People

Contributors

containerscrew avatar danielewood avatar firedrunk avatar goreleaserbot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tftools's Issues

Installation on Mac OS Monterey non-functional

Hey @containerscrew -> tftools looks great and I'd love to use it. Unfortunately I'm having trouble with the install on a Mac:

$ curl --proto '=https' --tlsv1.2 -sSfL https://raw.githubusercontent.com/containerscrew/tftools/main/scripts/install.sh | bash
Downloading... v0.5.0/tftools-darwin-.tar.gz

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404

☝️ I believe this is due to the install script supporting a combination of Darwin/x86_64 here: https://github.com/containerscrew/tftools/blob/main/scripts/install.sh#L58, but it looks like it's available as a release here: https://github.com/containerscrew/tftools/releases/download/v0.5.0/tftools-darwin-amd64.tar.gz.

parse outputs changes

Hi!

not an issue, more a proposal/question.
Do you think it would be difficult to parse "Changes to Outputs:" from the plan as well?
It's also an essential part of terraform plan information.

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.