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

[ORCA-3444] Add support for Event Orchestrations #512

Merged
merged 52 commits into from
Jun 1, 2022

Conversation

alenapan
Copy link
Contributor

@alenapan alenapan commented May 25, 2022

Changes:

  • Add support for the following resources:
    • pagerduty_event_orchestration
    • pagerduty_event_orchestration_router
    • pagerduty_event_orchestration_unrouted
    • pagerduty_event_orchestration_service

BEFORE MERGING:

go.mod Outdated
@@ -5,7 +5,7 @@ go 1.16
require (
cloud.google.com/go v0.71.0 // indirect
github.com/hashicorp/terraform-plugin-sdk/v2 v2.10.1
github.com/heimweh/go-pagerduty v0.0.0-20220422231448-43095fe5ba3f
github.com/heimweh/go-pagerduty v0.0.0-20220428180718-5a69bb821163
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This version needs to be updated after we merge is merged

alenapan and others added 29 commits May 27, 2022 15:56
…tion (#494)

* support unsetting orch team

* add retry logic to the event orchestration update method
* router path

* Add support for parent

* refactor

* update handler and actions support

* support conditions

* move conditions to util

* move parent to util

* test for multiple rules and conditions

* actions and catchall

* refactor tests

* validateFunc

* refactor

* undo local vendor module path change

* rules schema change and test

* PR comments addressed
* Init commit for unrouted

* Added tests for unrouted

* Added catch_all to unrouted schema

* Tweaked catch_all

* Merge event-orchestrations

* Add testacc for unrouted

* Added full config test for unrouted

* Add test for number of extractions and variables

* Cleaned router and added new test checks to unrouted

* Change escalation_policy from snake case to camel case
* Clean sweeper function for router/unrouted

* Clean sweeper function
* ORCA-3465 - Event Orchestration Service Path resource

* add resource file

* fix read/update, add test

* more tests

* more service path tests, add conditions

* more tests

* more tests

* add more service path props

* fix orch path PUT payload, add tests

* fix Suspend

* ToDos

* add catch_all support, fix tests

* add support for regex extractions, add mor tests, add service path import test

* update client

* PR feedback
* Flatten teams block

* Fixed naming for the test orchestration
@alenapan alenapan force-pushed the event-orchestrations branch from 1c6b05c to 0cfb66d Compare May 27, 2022 20:03
@alenapan alenapan marked this pull request as ready for review May 27, 2022 20:03
@alenapan
Copy link
Contributor Author

alenapan commented Jun 1, 2022

@stmcallister I went through the test cases outlined in these commits to test the changes made in #517 and everything looks good to me.

Copy link
Contributor

@stmcallister stmcallister left a comment

Choose a reason for hiding this comment

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

This looks AMAZING!!! THANK YOU!!! 🌮 🎉 🎉

@alenapan alenapan merged commit d1c22c1 into master Jun 1, 2022
@alenapan alenapan deleted the event-orchestrations branch June 1, 2022 20:29
stmcallister pushed a commit that referenced this pull request Jun 9, 2022
* ORCA-3459 - event orchestration resource

* reformat

* [REVERT LATER] Temporarily pointing to the local copy of go-pagerduty

* rename Orchestration references to EventOrchestration

* add more properties, mapping logic; add tests

* more tests to event_orchestration_resource

* add datasource event orchestration

* [REVERT LATER]-local testing

* fix create logic (set integrations), remove description and routes from orchestration data source

* fix data source, add data source tests

* reformat

* Add import tests

* update to latest alenapan/go-pagerduty

* add team checks to the tests

* [ORCA-3475] Allow deleting event orchestration team from an orchestration (#494)

* support unsetting orch team

* add retry logic to the event orchestration update method

* [ORCA-3463] Orchestration Path Router Resource (#493)

* router path

* Add support for parent

* refactor

* update handler and actions support

* support conditions

* move conditions to util

* move parent to util

* test for multiple rules and conditions

* actions and catchall

* refactor tests

* validateFunc

* refactor

* undo local vendor module path change

* rules schema change and test

* PR comments addressed

* Event orchestration unrouted resource (#495)

* Init commit for unrouted

* Added tests for unrouted

* Added catch_all to unrouted schema

* Tweaked catch_all

* Merge event-orchestrations

* Add testacc for unrouted

* Added full config test for unrouted

* Add test for number of extractions and variables

* Cleaned router and added new test checks to unrouted

* Change escalation_policy from snake case to camel case

* make type computed and set it on read/update

* Orca 3486 refactor (#500)

* Clean sweeper function for router/unrouted

* Clean sweeper function

* [ORCA-3465] - Event Orchestration Service path resource (#499)

* ORCA-3465 - Event Orchestration Service Path resource

* add resource file

* fix read/update, add test

* more tests

* more service path tests, add conditions

* more tests

* more tests

* add more service path props

* fix orch path PUT payload, add tests

* fix Suspend

* ToDos

* add catch_all support, fix tests

* add support for regex extractions, add mor tests, add service path import test

* update client

* PR feedback

* Flatten teams block (#506)

* Flatten teams block

* Fixed naming for the test orchestration

* ORCA-3486 - remove team attribute from service path

* flatten/rename parent to 'service' for service path

* remove type attribute from unrouted

* remove type attribute from router

* flatten/rename parent to 'event_orchestration' for router

* set event_orchestration attr on router import

* flatten/rename parent to 'event_orchestration' for unrouted

* Clean teams block

* revert changes on web file

* [ORCA-3486] - Reuse shared Event Orchestration Path logic, add import tests (#509)

* ORCA-3486 - add import tests for router/unrouted

* ORCA-3486 - add import tests for router, unrouted

* reuse severity/event_action validation functions in unrouted/service

* reuse variables and extractions schema in router/unrouted

* reuse shared conditions schema and mapping functions in router/unrouted/service

* [ORCA-3486] Extend unrouted tests, add CustomizeDiff, clean shared functions (#510)

* Extend unrouted tests, add CustomizeDiff, clean shared functions

* Move shared functions for unrouted and service paths to utils file

* orchestration and path resource documentation

* datasource documentation

* refactor

* update comment

* update type field documentation

* update documentation

* cleanup

* Remove mention of the suppress action from event_orchestration_unrouted docs

* Add "Optional" info to 1 attribute in event_orchestration_service docs

* give a better datasource example

* cleanup

* Add Event Orchestration info to the CHANGELOG (release date TBD) (#514)

* update go-pagerduty package

* Router - make sets, rules, conditions singular

* Unrouted, Service - make sets, rules, conditions, variables, extractions, pd_automation_actions, automations_action (headers, params) singular

* Event Orchestration - make integrations singular

* update Event Orchestration documentation

* EO data source - retry on any error

* EO data source - retry on any error

Co-authored-by: Pari Dhanakoti <pdhanakoti@pagerduty.com>
Co-authored-by: Alex Zakabluk <azakabluk@pagerduty.com>
Co-authored-by: Marcos Wright-Kuhns <webmaster@wrightkuhns.com>
Co-authored-by: Scott McAllister <smcallister@pagerduty.com>
stmcallister pushed a commit that referenced this pull request Jun 9, 2022
* ORCA-3459 - event orchestration resource

* reformat

* [REVERT LATER] Temporarily pointing to the local copy of go-pagerduty

* rename Orchestration references to EventOrchestration

* add more properties, mapping logic; add tests

* more tests to event_orchestration_resource

* add datasource event orchestration

* [REVERT LATER]-local testing

* fix create logic (set integrations), remove description and routes from orchestration data source

* fix data source, add data source tests

* reformat

* Add import tests

* update to latest alenapan/go-pagerduty

* add team checks to the tests

* [ORCA-3475] Allow deleting event orchestration team from an orchestration (#494)

* support unsetting orch team

* add retry logic to the event orchestration update method

* [ORCA-3463] Orchestration Path Router Resource (#493)

* router path

* Add support for parent

* refactor

* update handler and actions support

* support conditions

* move conditions to util

* move parent to util

* test for multiple rules and conditions

* actions and catchall

* refactor tests

* validateFunc

* refactor

* undo local vendor module path change

* rules schema change and test

* PR comments addressed

* Event orchestration unrouted resource (#495)

* Init commit for unrouted

* Added tests for unrouted

* Added catch_all to unrouted schema

* Tweaked catch_all

* Merge event-orchestrations

* Add testacc for unrouted

* Added full config test for unrouted

* Add test for number of extractions and variables

* Cleaned router and added new test checks to unrouted

* Change escalation_policy from snake case to camel case

* make type computed and set it on read/update

* Orca 3486 refactor (#500)

* Clean sweeper function for router/unrouted

* Clean sweeper function

* [ORCA-3465] - Event Orchestration Service path resource (#499)

* ORCA-3465 - Event Orchestration Service Path resource

* add resource file

* fix read/update, add test

* more tests

* more service path tests, add conditions

* more tests

* more tests

* add more service path props

* fix orch path PUT payload, add tests

* fix Suspend

* ToDos

* add catch_all support, fix tests

* add support for regex extractions, add mor tests, add service path import test

* update client

* PR feedback

* Flatten teams block (#506)

* Flatten teams block

* Fixed naming for the test orchestration

* ORCA-3486 - remove team attribute from service path

* flatten/rename parent to 'service' for service path

* remove type attribute from unrouted

* remove type attribute from router

* flatten/rename parent to 'event_orchestration' for router

* set event_orchestration attr on router import

* flatten/rename parent to 'event_orchestration' for unrouted

* Clean teams block

* revert changes on web file

* [ORCA-3486] - Reuse shared Event Orchestration Path logic, add import tests (#509)

* ORCA-3486 - add import tests for router/unrouted

* ORCA-3486 - add import tests for router, unrouted

* reuse severity/event_action validation functions in unrouted/service

* reuse variables and extractions schema in router/unrouted

* reuse shared conditions schema and mapping functions in router/unrouted/service

* [ORCA-3486] Extend unrouted tests, add CustomizeDiff, clean shared functions (#510)

* Extend unrouted tests, add CustomizeDiff, clean shared functions

* Move shared functions for unrouted and service paths to utils file

* orchestration and path resource documentation

* datasource documentation

* refactor

* update comment

* update type field documentation

* update documentation

* cleanup

* Remove mention of the suppress action from event_orchestration_unrouted docs

* Add "Optional" info to 1 attribute in event_orchestration_service docs

* give a better datasource example

* cleanup

* Add Event Orchestration info to the CHANGELOG (release date TBD) (#514)

* update go-pagerduty package

* Router - make sets, rules, conditions singular

* Unrouted, Service - make sets, rules, conditions, variables, extractions, pd_automation_actions, automations_action (headers, params) singular

* Event Orchestration - make integrations singular

* update Event Orchestration documentation

* EO data source - retry on any error

* EO data source - retry on any error

Co-authored-by: Pari Dhanakoti <pdhanakoti@pagerduty.com>
Co-authored-by: Alex Zakabluk <azakabluk@pagerduty.com>
Co-authored-by: Marcos Wright-Kuhns <webmaster@wrightkuhns.com>
Co-authored-by: Scott McAllister <smcallister@pagerduty.com>
mLupine added a commit to nordcloud/terraform-provider-pagerduty that referenced this pull request Jul 7, 2022
* upstream-master: (63 commits)
  Remove 429 check on remaining data sources
  capture panic caused by casting nil interface{} in pagerduty_service
  update output interface for `schedule` resource to display `rendered_coverage_performance`
  capture panic caused by casting nil interface{} in pagerduty_service
  Add v2.5.1 to CHANGELOG
  fix conflicts
  add test for custom_header
  [ORCA-3444] Add support for Event Orchestrations (PagerDuty#512)
  update slack integration docs
  Switch to always use @foo.test TLD in our tests & documentation
  refactor: customer_headers => custom_header
  Update website/docs/r/webhook_subscription.html.markdown
  Updated the dependancy hash and example usage
  Update pagerduty/resource_pagerduty_webhook_subscription.go
  Update pagerduty/resource_pagerduty_webhook_subscription.go
  fixing type error
  Adding custom_headers to delivery_method in webhook_subscription resource.
  add acc test for `priorities` attribute in `slack_connection`
  add test for custom_header
  Update CHANGELOG for v2.5.0 Release
  ...

# Conflicts:
#	README.md
#	go.mod
#	go.sum
#	pagerduty/data_source_pagerduty_business_service.go
#	pagerduty/data_source_pagerduty_escalation_policy.go
#	pagerduty/data_source_pagerduty_extension_schema.go
#	pagerduty/data_source_pagerduty_priority.go
#	pagerduty/data_source_pagerduty_ruleset.go
#	pagerduty/data_source_pagerduty_schedule.go
#	pagerduty/data_source_pagerduty_service.go
#	pagerduty/data_source_pagerduty_service_integration.go
#	pagerduty/data_source_pagerduty_tag.go
#	pagerduty/data_source_pagerduty_team.go
#	pagerduty/data_source_pagerduty_user.go
#	pagerduty/data_source_pagerduty_vendor.go
#	pagerduty/resource_pagerduty_service.go
#	pagerduty/resource_pagerduty_slack_connection.go
#	vendor/github.com/heimweh/go-pagerduty/pagerduty/pagerduty.go
#	vendor/github.com/heimweh/go-pagerduty/pagerduty/user.go
#	vendor/modules.txt
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.

5 participants