GithubHelp home page GithubHelp logo

tarragon's Introduction

tarragon

logo

Quick Terraform actions across multiple projects.

Written in Go.

Why?

You have multiple Terraform projects, but they're prototypes, quick tests, and don't warrant a dedicated deployment pipeline. So, you need to work with them manually via the command line.

You want to quickly validate/plan/apply projects without constantly changing to different project directories.

You need to run apply on multiple projects at the same time because your latest code changes affect both services, and you don't want to forget to push one without the other.

Tarragon is a TUI application that lets you select multiple projects to perform simultaneous Terraform actions on.

Screenshot

Where?

If you have Go installed, run:

go install github.com/sho-87/tarragon@latest

Otherwise, you can download the application for your operating system on the Releases page.

How?

Tarragon is designed to work with related projects, so assumes that your projects are nested somewhere inside a common parent directory. Example:

Services
|--- Project1
|--- Project2
|--- OtherService
     |--- Project3

First, make sure the Tarragon executable is available on your path, or otherwise callable from your command line.

Run tarragon in your command line, which will bring up the UI and find all nested projects from your current working directory.

You can also supply a different root directory using tarragon --path "path/to/projects"

General Keybinds

(full list of keybinds can be found using ?)

Run validate/plan/apply actions using v, p, and a on a highlighted project.

You can select multiple projects using space and run actions on them at the same time using the capitalized keybinds V, P, and A.

Note: apply will always run with the --auto-approve flag, so it's recommend to first run plan on the project and check the output.

Output View

After running any Terraform command on a project, you can view the most recent output by pressing tab:

Output

Filtering

You can filter the projects table by pressing /, which will bring up an input field for the filter term:

Filtering

tarragon's People

Contributors

sho-87 avatar

Stargazers

Louis Garman avatar

Watchers

Louis Garman avatar  avatar  avatar

tarragon's Issues

Panic on launch

Caught panic:

strings: negative Repeat count

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
        C:/Program Files/Go/src/runtime/debug/stack.go:24 +0x5e
runtime/debug.PrintStack()
        C:/Program Files/Go/src/runtime/debug/stack.go:16 +0x13
github.com/charmbracelet/bubbletea.(*Program).Run.func1()
        C:/Users/Simon.Ho/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:478 +0x91
panic({0xe1b180?, 0xed18d0?})
        C:/Program Files/Go/src/runtime/panic.go:770 +0x132
strings.Repeat({0xecfbb0?, 0x0?}, 0xecfbb0?)
        C:/Program Files/Go/src/strings/strings.go:549 +0x318
main.MainModel.View({0x0, {{{0xc000004388, 0x8, 0x8}, {0xc000004708, 0xb, 0x12}, 0x1, {0xc00012c488, 0xb, ...}, ...}}, ...})
        C:/Users/Simon.Ho/go/pkg/mod/github.com/sho-87/[email protected]/main.go:312 +0x9d2
github.com/charmbracelet/bubbletea.(*Program).eventLoop(0xc000151e10, {0xed34d0?, 0xc000162008?}, 0xc000076180)
        C:/Users/Simon.Ho/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:413 +0x627
github.com/charmbracelet/bubbletea.(*Program).Run(0xc000151e10)
        C:/Users/Simon.Ho/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:543 +0x88b
main.main()
        C:/Users/Simon.Ho/go/pkg/mod/github.com/sho-87/[email protected]/main.go:363 +0x40e

add pre/post command hooks

some ability to execute scripts pre/post running a command. useful for things like:

  • cleaning cache directories pre-apply
  • removing local builds post-apply

a simpler, more manual approach would be a simple list of user created scripts that can be run on a project at any time. this avoids the problem of needing to store which pre/post hooks are associated with which specific projects

UX of filtering is unclear

When pressing / to start filtering, its not immediately obvious that youve entered the filter state. Similar with confirming/quitting the filter input

Theres probably a better event to check for in updateFooter() than GetIsFilterInputFocused()

add apply output

add the output from apply operations to the Output view in case there is some error that needs to be attended to

the view could show either the latest output (regardless of whether its from plan or apply), or the ability to toggle between the 2

Selected rows are lost on update

MainModel View() has a bug where the progress bar reaches 100% too quickly because SelectedRows() value gets reset so you get a division by inf

After running any command on multiple projects, updateData() will clear the row selection as new rows are generated

Both are due to upstream Evertras/bubble-table#167

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.