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

Adding Service Event Rules and Rules Bug Fixes #296

Merged
merged 4 commits into from
Feb 9, 2021

Conversation

stmcallister
Copy link
Contributor

@stmcallister stmcallister commented Feb 5, 2021

This PR adds the pagerduty_service_event_rule resource, addressing #279.

It also adds suspend and variables fields to pagerduty_ruleset_rule mentioned in #272.

Also allows suppress.value to be set to false. #295, #245, #225.

Fixed bug in pagerduty_ruleset_rule where position wasn't setting properly. The position should now set correctly on the first apply for both pagerduty_ruleset_rule and pagerduty_service_event_rule.

Test results for the pagerduty_service_event_rule resource are here:

TF_ACC=1 go test -run "TestAccPagerDutyServiceEventRule" ./pagerduty -v -timeout 120m
=== RUN   TestAccPagerDutyServiceEventRule_import
--- PASS: TestAccPagerDutyServiceEventRule_import (10.92s)
=== RUN   TestAccPagerDutyServiceEventRule_Basic
--- PASS: TestAccPagerDutyServiceEventRule_Basic (13.19s)
=== RUN   TestAccPagerDutyServiceEventRule_MultipleRules
--- PASS: TestAccPagerDutyServiceEventRule_MultipleRules (14.40s)
PASS
ok  	github.com/terraform-providers/terraform-provider-pagerduty/pagerduty	39.888s

And for pagerduty_ruleset_rule here:

TF_ACC=1 go test -run "TestAccPagerDutyRulesetRule" ./pagerduty -v -timeout 120m     
=== RUN   TestAccPagerDutyRulesetRule_import
--- PASS: TestAccPagerDutyRulesetRule_import (5.23s)
=== RUN   TestAccPagerDutyRulesetRule_Basic
--- PASS: TestAccPagerDutyRulesetRule_Basic (5.90s)
=== RUN   TestAccPagerDutyRulesetRule_MultipleRules
--- PASS: TestAccPagerDutyRulesetRule_MultipleRules (6.43s)
PASS
ok  	github.com/terraform-providers/terraform-provider-pagerduty/pagerduty	18.212s

@stmcallister stmcallister requested review from heimweh and removed request for heimweh February 5, 2021 01:30
@dobs dobs self-requested a review February 6, 2021 02:35
Copy link
Contributor

@dobs dobs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM -- only thing to confirm is whether the tags stuff is intended to be included in this PR as well. Otherwise just two nits.

website/docs/r/ruleset_rule.html.markdown Outdated Show resolved Hide resolved
@stmcallister stmcallister merged commit 315b309 into PagerDuty:master Feb 9, 2021
@stmcallister stmcallister deleted the service-event-rules branch February 13, 2021 00:59
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 this pull request may close these issues.

2 participants