-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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 PagerDuty provider #9022
Conversation
@heimweh hi there! This is great, absolutely great. Once you get the |
Hi! :) thanks for the feedback, sounds good, I'll definitely look into this asap. |
74d8a87
to
cc2b025
Compare
@heimweh Sir, you are a Gentleman and a Scholar. This is absolutely amazing! |
1273be6
to
1115683
Compare
Thanks @kwilczynski! really appreciate it :) I've made quite some changes lately and that changed the logic quite a bit, sorry about that. I'll try to refactor my code a bit, I feel like I made a bit of a mess in there when moving things around. I'll also update the documentation and hopefully get around to add more test cases soon. |
a8da764
to
fd54b16
Compare
Hi @heimweh Thanks for all the work here - just in preparation to getting this merged, what level of pagerduty plan is needed to run the entire set of tests for this provider? Paul |
Hi @stack72, to run the entire set of tests a This is the output when running the tests using a $ make testacc TEST=./builtin/providers/pagerduty
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/10/24 15:02:30 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/pagerduty -v -timeout 120m
=== RUN TestAccPagerDutyVendor_Basic
--- PASS: TestAccPagerDutyVendor_Basic (11.42s)
=== RUN TestAccPagerDutyEscalationPolicy_import
--- PASS: TestAccPagerDutyEscalationPolicy_import (9.29s)
=== RUN TestAccPagerDutySchedule_import
--- PASS: TestAccPagerDutySchedule_import (8.84s)
=== RUN TestAccPagerDutyService_import
--- PASS: TestAccPagerDutyService_import (12.74s)
=== RUN TestAccPagerDutyTeam_import
--- FAIL: TestAccPagerDutyTeam_import (0.41s)
testing.go:265: Step 0 error: Error applying: 1 error(s) occurred:
* pagerduty_team.foo: Failed call API endpoint. HTTP response code: 402. Error: &{2014 Required abilities are unavailable [The teams account ability is required to access teams]}
=== RUN TestAccPagerDutyUser_import
--- PASS: TestAccPagerDutyUser_import (8.07s)
=== RUN TestProvider
--- PASS: TestProvider (0.00s)
=== RUN TestProviderImpl
--- PASS: TestProviderImpl (0.00s)
=== RUN TestAccPagerDutyEscalationPolicy_Basic
--- PASS: TestAccPagerDutyEscalationPolicy_Basic (11.65s)
=== RUN TestAccPagerDutyEscalationPolicyWithTeams_Basic
--- FAIL: TestAccPagerDutyEscalationPolicyWithTeams_Basic (5.70s)
testing.go:265: Step 0 error: Error applying: 1 error(s) occurred:
* pagerduty_team.foo: Failed call API endpoint. HTTP response code: 402. Error: &{2014 Required abilities are unavailable [The teams account ability is required to access teams]}
=== RUN TestAccPagerDutySchedule_Basic
--- PASS: TestAccPagerDutySchedule_Basic (12.02s)
=== RUN TestAccPagerDutySchedule_Multi
--- PASS: TestAccPagerDutySchedule_Multi (9.37s)
=== RUN TestAccPagerDutyServiceIntegration_Basic
--- PASS: TestAccPagerDutyServiceIntegration_Basic (32.07s)
=== RUN TestAccPagerDutyService_Basic
--- PASS: TestAccPagerDutyService_Basic (15.92s)
=== RUN TestAccPagerDutyTeam_Basic
--- FAIL: TestAccPagerDutyTeam_Basic (0.44s)
testing.go:265: Step 0 error: Error applying: 1 error(s) occurred:
* pagerduty_team.foo: Failed call API endpoint. HTTP response code: 402. Error: &{2014 Required abilities are unavailable [The teams account ability is required to access teams]}
=== RUN TestAccPagerDutyUser_Basic
--- PASS: TestAccPagerDutyUser_Basic (7.03s)
=== RUN TestAccPagerDutyUserWithTeams_Basic
--- FAIL: TestAccPagerDutyUserWithTeams_Basic (0.46s)
testing.go:265: Step 0 error: Error applying: 1 error(s) occurred:
* pagerduty_team.foo: Failed call API endpoint. HTTP response code: 402. Error: &{2014 Required abilities are unavailable [The teams account ability is required to access teams]}
FAIL
exit status 1
FAIL github.com/hashicorp/terraform/builtin/providers/pagerduty 145.436s
make: *** [testacc] Error 1 |
Thanks for the info - will get on with a final review now :) |
Awesome, thank you so much :) |
@heimweh @stack72 the only things from me would be potentially (just before we merge):
But, none of it is really super-essential to get it merged. Having said that, @heimweh did a truly AMAZING job! I cannot express enough how outstanding this Pull Request really is! |
@kwilczynski thanks for your feedback! :) removed the unnecessary use of &schema.Schema. Will definitely take a look at the rest. |
thanks for the work here - this is a really solid looking PR! :) I agree with the feedback that @kwilczynski has suggested - these can be a follow up PR so we can get on with getting this merged in and having the nightly tests run as expected :) I am just getting a pagerduty account setup right now so I can run the tests. If all look ok, I will merge this - stay tuned! |
Thanks guys 😊 I really appreciate the feedback :) This community is just pure awesomeness, so happy to be able to contribute. Thanks again! :) |
@heimweh this works fantastically :)
|
Awesome! thank you so much @stack72 ! :) |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
This is my first contribution and my first time writing Go,
and I will most likely need some handholding during this process, but here goes.
Due to the missing PagerDuty support I decided to take a look at writing a provider for it.
It currently supports:
I've been testing it a lot in the past couple of days and the basic functionality is there, but as you might notice my knowledge of Go is currently somewhat limited.
Any feedback is more than welcome and I would love to see some continuation/improvements of this provider.