Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/flavono123/terraform-plan-summary

Add a `-summary` flag for `terraform plan`
https://github.com/flavono123/terraform-plan-summary

Last synced: about 1 month ago
JSON representation

Add a `-summary` flag for `terraform plan`

Awesome Lists containing this project

README

        

# `terraform plan -summary`

![demo](assets/demo.gif)

*Summarize resource addresses from a `terraform plan` result*

## Prerequisites

- [`terraform`](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli)
- [`jq`](https://jqlang.github.io/jq/download/)

### MacOS

```sh
brew install terraform jq
# or install terraform by `tfenv`
```

## Install

```sh
wget -qO $HOME/.terraform.d/terraform-plan-summary https://github.com/flavono123/terraform-plan-summary/releases/download/v0.1.1/terraform-plan-summary && \
chmod +x $HOME/.terraform.d/terraform-plan-summary && \
echo "alias terraform='$HOME/.terraform.d/terraform-plan-summary'" >> $HOME/.bashrc && \
source $HOME/.bashrc
```

### Local

```sh
# clone
$ git clone https://github.com/flavono123/terraform-plan-summary.git
$ cd terraform-plan-summary
$ cp terraform-plan-summary $HOME/.terraform.d/terraform-plan-summary && \
chmod +x $HOME/.terraform.d/terraform-plan-summary && \
echo "alias terraform='$HOME/.terraform.d/terraform-plan-summary'" >> $HOME/.bashrc && \
source $HOME/.bashrc
```

## References

[Show only the resources that will be changed in terraform plan - trying to use jq for this](https://www.reddit.com/r/Terraform/comments/10m7jdd/show_only_the_resources_that_will_be_changed_in/)