Skip to content

Commit

Permalink
Updating website docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kevals-splunk committed Sep 4, 2020
1 parent 80403f0 commit 2c30bea
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 5 deletions.
102 changes: 102 additions & 0 deletions website/docs/r/escalation_policy.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
layout: "victorops"
page_title: "VictorOps: victorops_escalation_policy"
description: |-
Creates and manages a user in VictorOps.
---

# victorops\_escalation\_policy

[Team Escalation Policies](https://portal.victorops.com/public/api-docs.html#/Escalation32Policies) set who is actually on-call for a given team and are the link to utilize any rotations that have been created.

Note: You need to fetch an existing Rotation Group Slug through the VO public API - [GET-Rotations](https://portal.victorops.com/public/api-docs.html#!/Rotations/get_api_public_v1_teams_team_rotations) for creating an escalation policy resource from Terraform

## Example Usage

```hcl
resource "victorops_escalation_policy" "vikings_high_severity" {
name = "High Severity"
team_id = victorops_team.team_vikings.id
step {
timeout = 0
entries = [
{
type = "rotationGroup"
slug = "rtg-wvvhXshpvaRdn7jM"
}
]
}
step {
timeout = 10
entries = [
{
type = "rotationGroup"
slug = "rtg-hfy3fUytq7otMNbf"
}
]
}
}
resource "victorops_escalation_policy" "vikings_low_severity" {
name = "Low Severity"
team_id = victorops_team.team_vikings.id
step {
timeout = 0
entries = [
{
type = "rotationGroup"
slug = "rtg-wvvhXshpvaRdn7jM"
}
]
}
step {
timeout = 300
entries = [
{
type = "rotationGroup"
slug = "rtg-hfy3fUytq7otMNbf"
}
]
}
step {
timeout = 300
entries = [
{
type = "targetPolicy"
slug = victorops_escalation_policy.vikings_high_severity.id
}
]
}
}
```

## Argument Reference

The following arguments are supported:

* `name` - (Required) The name of this escalation policy
* `team_id` - (Required) The team_id of the team for which you want to create this escalation policy
* `ignore_custom_paging_policies` - (Optional) `true`/`false`
* `step` - (Required) - The escalation policy step defined in the following structure

```hcl
step {
timeout = [time-out duration in seconds]
entries = [
{
type = [ rotationalGroup | targetPolicy ]
slug = [ rotatioGroup slug | next escalation policy ID ]
},
]
}
```

## Attributes Reference

The following attributes are exported:

* `id` - The ID of the escalation policy.

## Import

Import is not currently supported
4 changes: 2 additions & 2 deletions website/docs/r/routing_key.html.markdown
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
layout: "victorops"
page_title: "VictorOps: victorops_user"
page_title: "VictorOps: victorops_routing_key"
description: |-
Creates and manages a routing key in VictorOps
---

# victorops\_user
# victorops\_routing\_key

A routing key in VictorOps is used to route incoming alerts to specific escalation policies.

Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/team.html.markdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: "victorops"
page_title: "VictorOps: victorops_user"
page_title: "VictorOps: victorops_team"
description: |-
Creates and manages a user in VictorOps.
Creates and manages a team in VictorOps.
---

# victorops\_team
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/team_membership.html.markdown
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: "victorops"
page_title: "VictorOps: victorops_contact_phone"
page_title: "VictorOps: victorops_team_membership"
description: |-
Manages a user's team association within victorops
---
Expand Down
3 changes: 3 additions & 0 deletions website/victorops.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
<li<%= sidebar_current("docs-victorops-team-membership") %>>
<a href="/docs/providers/victorops/r/team_membership.html">victorops_team_membership</a>
</li>
<li<%= sidebar_current("docs-victorops-escalation-policy") %>>
<a href="/docs/providers/victorops/r/escalation_policy.html">victorops_escalation_policy</a>
</li>
<li<%= sidebar_current("docs-victorops-contact-phone") %>>
<a href="/docs/providers/victorops/r/contact_phone.html">victorops_contact_phone</a>
</li>
Expand Down

0 comments on commit 2c30bea

Please sign in to comment.