Skip to content

Commit

Permalink
Og terra notification (#121)
Browse files Browse the repository at this point in the history
* Notification rule resource added

* Fixed e2e / acceptance tests - request body

Co-authored-by: Jacek Kikiewicz <[email protected]>
  • Loading branch information
GarimaDamani and jaceq authored Sep 4, 2020
1 parent 9d7ce64 commit 4ed3e8b
Show file tree
Hide file tree
Showing 12 changed files with 1,715 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.4.8 (September 4, 2020)
NEW RESOURCE:
* Notification rule implemented (#121)


## 0.4.7 (August 26, 2020)

IMPROVEMENTS:
Expand Down
4 changes: 0 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,6 @@ github.com/mitchellh/reflectwalk v1.0.1 h1:FVzMWA5RllMAKIdUSC8mdWo3XtwoecrH79BY7
github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw=
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
github.com/opsgenie/opsgenie-go-sdk-v2 v1.2.1-0.20200814082615-0451657a72bb h1:jrc1HVw4t8jZxd4LhiRCF9zp+NUsufZ5+KbLZ76ENOg=
github.com/opsgenie/opsgenie-go-sdk-v2 v1.2.1-0.20200814082615-0451657a72bb/go.mod h1:VOkJ7STzYj+nXRhMcBTcmt8uZZ17KZKJdZtJpgHLbT8=
github.com/opsgenie/opsgenie-go-sdk-v2 v1.2.2-0.20200818092809-258635176b1d h1:FXSBAW4+IgVlSt9Fo3Kq7aK8v2F8eBYLm4BiDOzdKLI=
github.com/opsgenie/opsgenie-go-sdk-v2 v1.2.2-0.20200818092809-258635176b1d/go.mod h1:VOkJ7STzYj+nXRhMcBTcmt8uZZ17KZKJdZtJpgHLbT8=
github.com/opsgenie/opsgenie-go-sdk-v2 v1.2.2-0.20200820123717-3bcc8ea32b68 h1:aeMcivVe6oeKG+2eIml82VULDUIRLXfqEDNmfjesf5o=
github.com/opsgenie/opsgenie-go-sdk-v2 v1.2.2-0.20200820123717-3bcc8ea32b68/go.mod h1:VOkJ7STzYj+nXRhMcBTcmt8uZZ17KZKJdZtJpgHLbT8=
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
Expand Down
2 changes: 1 addition & 1 deletion opsgenie/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ func Provider() terraform.ResourceProvider {
},

ResourcesMap: map[string]*schema.Resource{

"opsgenie_team": resourceOpsGenieTeam(),
"opsgenie_team_routing_rule": resourceOpsGenieTeamRoutingRule(),
"opsgenie_user": resourceOpsGenieUser(),
"opsgenie_user_contact": resourceOpsGenieUserContact(),
"opsgenie_notification_policy": resourceOpsGenieNotificationPolicy(),
"opsgenie_notification_rule": resourceOpsGenieNotificationRule(),
"opsgenie_escalation": resourceOpsgenieEscalation(),
"opsgenie_api_integration": resourceOpsgenieApiIntegration(),
"opsgenie_email_integration": resourceOpsgenieEmailIntegration(),
Expand Down
2 changes: 1 addition & 1 deletion opsgenie/resource_opsgenie_notification_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,8 @@ func expandOpsGenieNotificationPolicyDelayAction(input []interface{}) *policy.De
config := v.(map[string]interface{})
action.DelayOption = policy.DelayType(config["delay_option"].(string))
untilMinute := config["until_minute"].(int)
action.UntilMinute = &untilMinute
untilHour := config["until_hour"].(int)
action.UntilMinute = &untilMinute
action.UntilHour = &untilHour
if len(config["duration"].([]interface{})) > 0 {
action.Duration = expandOpsGenieNotificationPolicyDuration(config["duration"].([]interface{}))
Expand Down
Loading

0 comments on commit 4ed3e8b

Please sign in to comment.