mercari / tfnotify

A CLI command to parse Terraform execution result and notify it to GitHub
MIT License
620 stars 91 forks source link

feat(tf,plan): extract action part from terraform plan output. #49

Open hanks opened 4 years ago

hanks commented 4 years ago

WHAT

Extract the action part of terraform plan, to help us to focus on the more important part during code review.

WHY

Sometimes we found the part about Refreshing Terraform state in-memory prior to plan has too many lines that we do not need to care about in the code review. So make this change can help us to focus on the action part that terraform plan is.

DEMO

The Action part will be content below:

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  + google_compute_global_address.my_another_project
      id:         <computed>
      address:    <computed>
      ip_version: "IPV4"
      name:       "my-another-project"
      project:    "my-project"
      self_link:  <computed>
hanks commented 4 years ago

This PR is spirited by #11, but it is closed, it is a good idea for code review, so I try to make this happen again. Thank you for your time.

hanks commented 4 years ago

@dtan4 @b4b4r07 Hi, would you be able to check this PR at your earliest convenience, thank you for your time.

babarot commented 4 years ago

Thank you for the contribution! This is really nice, please wait a bit more to be reviewed..!

babarot commented 4 years ago

Code seems good. But actually it didn't work well. I tested this it in local but no action part was not shown.

hanks commented 4 years ago

@b4b4r07 Thanks for the comment! Since it is a very old PR, and introduced many complicated from last master branch, so I did a rebase and solved the conflicts.

May I ask a question: How to test in local? Like I use terraform plan | tfnotify --config=.tfnotify.yaml plan, and added some fmt.Println for the debug, but I can not see any output from the terminal.

mocyuto commented 4 years ago

I would want to use this feature. Is there any plan to progress?