-
Notifications
You must be signed in to change notification settings - Fork 212
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
Add support for service level auto_pause_notifications_parameters #525
Add support for service level auto_pause_notifications_parameters #525
Conversation
service := fmt.Sprintf("tf-%s", acctest.RandString(5)) | ||
|
||
resource.Test(t, resource.TestCase{ | ||
// PreCheck: func() { testAccPreCheck(t); testAccPreCheckPagerDutyAbility(t, "XXX") }, // FIXME: not sure which ability this feature is depending on https://developer.pagerduty.com/api-reference/9def78ed82b74-list-abilities |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure which ability this feature is depending on https://developer.pagerduty.com/api-reference/9def78ed82b74-list-abilities
Maybe vendored dependencies should be dropped altogether to only rely on |
Marked as draft as I missed some important parts in my former commit, and I'm now facing issues. |
Submitted heimweh/go-pagerduty#94 to fix issues with JSON serialization. Next time, I'll submit both library and provider PR at the same time as I used to do before. |
This is now ready for review. Acceptance test results:
|
resource.TestCheckResourceAttr( | ||
"pagerduty_service.foo", "auto_pause_notifications_parameters.0.enabled", "false"), | ||
resource.TestCheckResourceAttr( | ||
"pagerduty_service.foo", "auto_pause_notifications_parameters.0.timeout", "0"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We get 0 instead of null
because that's the default for TypeInt, see hashicorp/terraform-plugin-sdk#90.
Switching to https://github.com/hashicorp/terraform-plugin-framework in the future may help here.
Rebased on master, acceptance tests results:
The |
Rebased on master and pulled in heimweh/go-pagerduty@5d470ed, acceptance tests results:
|
Hi @imjaroiswebdev, the alert grouping acceptance test is still triggering errors with the new terraform SDK:
Changing this to:
resolves the issue:
See #525 (comment) |
Hi @pdecat thank you for this awesome addition to support Auto Pause Notifications Parameters, I've been reviewing it and looks great, but if you don't mind We would prefer to let the module vendoring and tidy for another PR like #532 which you already opened and focus this one in adding this improvement to the Provider. So thinking on that I have rebased and reapplied your commit in a new branch on my fork for you to see how We can do add the change without updating vendors and tidy and continue from there. Please take a look at it in the following branches comparison... https://github.com/pdecat/terraform-provider-pagerduty/compare/auto_pause_notifications_parameters...imjaroiswebdev:terraform-provider-pagerduty:auto_pause_notifications_parameters |
Hi @imjaroiswebdev, updating at least part of the dependencies is required because of heimweh/go-pagerduty@2e1f764 If you don't,
|
Hi @imjaroiswebdev, I've now rebased on master following your go modules updates, and dropped my corresponding commits from this branch. Acceptance tests results:
Note: I had to run
|
…fications_parameters`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This a great addition @pdecat thank you so much for your contribution🎉💪🏽, since you have done all the heavy lifting with this excellent PR and all the current and new tests are passing, in the end I only added the final and superficial touches for be able to merged adding a link to the docs which mention the plan restrictions for the PagerDuty account in the documentation you added, on top of that, I removed your inquire about the ability to do the precheck on the test and added the generic test precheck We have, since this configuration can be done by, but the limitation mentioned is related to its use, because of that there is no an explicit ability listed.
This PR adds support for service level
auto_pause_notifications_parameters
.Dependencies were updated with
go get -u ./... && go mod vendor && go mod tidy
to fetch updates from:Acceptance test results: