mercari / tfnotify

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

Parsing fails when only any output values are added #95

Open johnmanjiro13 opened 3 years ago

johnmanjiro13 commented 3 years ago

WHAT

When I add an output value only and run terraform plan, tfnotify caused an error and return exit code 1.

WHY

terraform version: 1.0.0

tfnotify checks texts with regular expression below. https://github.com/mercari/tfnotify/blob/master/terraform/parser.go#L64 But when we ran plan adding any output values only, terraform's output didn't contain Plan: or No changes and tfnotify failed to parse. Terraform's output result is a like below:

pagerduty_schedule.secondary: Refreshing state...
pagerduty_schedule.primary: Refreshing state...
pagerduty_team_membership.team[0]: Refreshing state...
pagerduty_team_membership.team[1]: Refreshing state...
pagerduty_escalation_policy.team: Refreshing state...
pagerduty_service.team: Refreshing state...
pagerduty_service_integration.datadog: Refreshing state...

------------------------------------------------------------------------

Changes to Outputs:
  + my_another_project_name = "my-another-project"

------------------------------------------------------------------------

Thanks!