From 6b419e65944b12d9bf679b5cb407f0182c3138d1 Mon Sep 17 00:00:00 2001 From: Alexander Hellbom Date: Mon, 26 Sep 2016 22:14:08 +0200 Subject: [PATCH] Add documentation --- website/source/assets/stylesheets/_docs.scss | 1 + .../providers/pagerduty/index.html.markdown | 41 +++++++++++ .../r/escalation_policy.html.markdown | 62 +++++++++++++++++ .../pagerduty/r/service.html.markdown | 68 +++++++++++++++++++ .../providers/pagerduty/r/team.html.markdown | 37 ++++++++++ .../providers/pagerduty/r/user.html.markdown | 55 +++++++++++++++ website/source/layouts/pagerduty.erb | 35 ++++++++++ 7 files changed, 299 insertions(+) create mode 100644 website/source/docs/providers/pagerduty/index.html.markdown create mode 100644 website/source/docs/providers/pagerduty/r/escalation_policy.html.markdown create mode 100644 website/source/docs/providers/pagerduty/r/service.html.markdown create mode 100644 website/source/docs/providers/pagerduty/r/team.html.markdown create mode 100644 website/source/docs/providers/pagerduty/r/user.html.markdown create mode 100644 website/source/layouts/pagerduty.erb diff --git a/website/source/assets/stylesheets/_docs.scss b/website/source/assets/stylesheets/_docs.scss index ed6ec5cda..af6776ad4 100755 --- a/website/source/assets/stylesheets/_docs.scss +++ b/website/source/assets/stylesheets/_docs.scss @@ -37,6 +37,7 @@ body.layout-mailgun, body.layout-mysql, body.layout-openstack, body.layout-packet, +body.layout-pagerduty, body.layout-postgresql, body.layout-powerdns, body.layout-rabbitmq, diff --git a/website/source/docs/providers/pagerduty/index.html.markdown b/website/source/docs/providers/pagerduty/index.html.markdown new file mode 100644 index 000000000..c7504095c --- /dev/null +++ b/website/source/docs/providers/pagerduty/index.html.markdown @@ -0,0 +1,41 @@ +--- +layout: "pagerduty" +page_title: "Provider: PagerDuty" +sidebar_current: "docs-pagerduty-index" +description: |- + PagerDuty is an alarm aggregation and dispatching service +--- + +# PagerDuty Provider + +[PagerDuty](https://www.pagerduty.com/) is an alarm aggregation and dispatching service for system administrators and support teams. It collects alerts from your monitoring tools, gives you an overall view of all of your monitoring alarms, and alerts an on duty engineer if there’s a problem. + +Use the navigation to the left to read about the available resources. + +## Example Usage + +``` +# Configure the PagerDuty provider +provider "pagerduty" { + token = "${var.pagerduty_token}" +} + +# Create a PagerDuty team +resource "pagerduty_team" "engineering" { + name = "Engineering" + description = "All engineering" +} + +# Create a PagerDuty user +resource "pagerduty_user" "earline" { + name = "Earline Greenholt" + email = "125.greenholt.earline@graham.name" + teams = ["${pagerduty_team.engineering.id}"] +} +``` + +## Argument Reference + +The following arguments are supported: + +* `token` - (Required) The v2 authorization token. See [API Documentation](https://v2.developer.pagerduty.com/docs/authentication) for more information. diff --git a/website/source/docs/providers/pagerduty/r/escalation_policy.html.markdown b/website/source/docs/providers/pagerduty/r/escalation_policy.html.markdown new file mode 100644 index 000000000..1128ca196 --- /dev/null +++ b/website/source/docs/providers/pagerduty/r/escalation_policy.html.markdown @@ -0,0 +1,62 @@ +--- +layout: "pagerduty" +page_title: "PagerDuty: pagerduty_escalation_policy" +sidebar_current: "docs-pagerduty-resource-escalation_policy" +description: |- + Creates and manages an escalation policy in PagerDuty. +--- + +# pagerduty\_escalation_policy + +An [escalation policy](https://v2.developer.pagerduty.com/v2/page/api-reference#!/Escalation_Policies/get_escalation_policies) determines what user or schedule will be notified first, second, and so on when an incident is triggered. Escalation policies are used by one or more services. + + +## Example Usage + +``` +resource "pagerduty_user" "example" { + name = "Earline Greenholt" + email = "125.greenholt.earline@graham.name" + teams = ["${pagerduty_team.example.id}"] +} + +resource "pagerduty_escalation_policy" "example" { + name = "Engineering" + description = "Engineering Escalation Policy" + num_loops = 2 + escalation_rules = < + <% content_for :sidebar do %> + + <% end %> + + <%= yield %> + <% end %>