Skip to content

feat: add a --show to gh tp to display plan output #115

@esacteksab

Description

@esacteksab

Right now, when you run gh tp you get this

$ gh tp
✔  Plan Created...
✔  Markdown Created...

And two files

$ ls | grep plan
plan.md
plan.out

It would be nice to have this behavior with --show being passed.

$ terraform show plan.out

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed.

I've been using a workflow that does a terraform plan to ensure it does what I want/need, then when I'm ready, I run gh tp after I've done "git things" to create the files and the markdown. But if a person were more confident, there could be a path of "do git things, gh tp" so a person may want to see the plan output as a part of the workflow.

** edit ** reading this again, this has the possibility of introducing a --dry-run where a person could run gh tp --dry-run and it displays the plan output and creates the markdown. Then when they're ready, run gh tp to create the PR. In this workflow, --show wouldn't necessarily need to exist, as it would be a native function of --dry-run.

Things to consider:

  • Should --show be a parameter (e.g show = true in .tp.toml)?
  • Should --dry-run be a parameter (e.g dry-run = false in .tp.toml)?
  • Should either or both be an env var?
  • Or just CLI args?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions