tfnotify icon indicating copy to clipboard operation
tfnotify copied to clipboard

Possible to use this tool on local machine?

Open uohzxela opened this issue 8 years ago • 1 comments

Hey there, nice project. From the looks of it, this tool is supposed to run on CI server. Just asking if it's possible to use this tool on local machine when running terraform plan/apply? Thanks!

uohzxela avatar Apr 16 '18 11:04 uohzxela

If you specify Slack as its notificator, you can run this from your machine.

---
ci: circleci
notifier:
  slack:
    token: $SLACK_TOKEN
$ terraform plan | tfnotify plan

However, as you said, tfnotify cannot be run in local machine if GitHub is selected as notificator. Because tfnotify cannot know the GitHub P-R number if it ran in local machine.

For now, tfnotify can know that number if it ran in CI machine, thanks to this feature: https://github.com/mercari/tfnotify/blob/ecebe3404f08929df282021b5c426b1cb96752bc/ci.go#L44-L48

Do you need to run this in your local machine?

babarot avatar Apr 23 '18 07:04 babarot