Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for threshold_time_unit in a pagerduty_service_event_rule is wrong #320

Closed
PabloL007 opened this issue Apr 2, 2021 · 1 comment · Fixed by #322
Closed

Comments

@PabloL007
Copy link

PabloL007 commented Apr 2, 2021

Hello, I've encountered an issue with the provider's documentation (here). It states that the threshold_time_unit field of a suppression action in a pagerduty_service_event_rule resource can take the value "days" but when attempting to create a resource with that value it fails with the error:

Error: "days" is an invalid value for argument actions.0.suppress.0.threshold_time_unit. Must be one of []string{"minutes", "seconds", "hours"}

Terraform Version

1.14.9

Provider Version

1.9.5

Affected Resource(s)

  • pagerduty_service_event_rule

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

resource "pagerduty_service_event_rule" "info_suppression" {
  position = 0
  service  = pagerduty_service.service.id

  conditions {
    operator = "and"

    subconditions {
      operator = "equals"

      parameter {
        value = "Info"
        path  = "severity"
      }
    }
  }

  actions {
    suppress {
      value                               = true
      threshold_time_amount = 1
      threshold_time_unit       = "days"
      threshold_value              = 8
    }
  }
}

Expected Behavior

The documentation should show that the accepted values are "seconds", "minutes" and "hours"

Actual Behavior

The documentation says that the accepted values are "minutes", "hours" and "days"

@stmcallister
Copy link
Contributor

Nice catch! Thanks for pointing this out. Will update shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants