Add documentation

This commit is contained in:
Alexander Hellbom 2016-09-26 22:14:08 +02:00
parent 7f35b56df8
commit 6b419e6594
7 changed files with 299 additions and 0 deletions

View File

@ -37,6 +37,7 @@ body.layout-mailgun,
body.layout-mysql, body.layout-mysql,
body.layout-openstack, body.layout-openstack,
body.layout-packet, body.layout-packet,
body.layout-pagerduty,
body.layout-postgresql, body.layout-postgresql,
body.layout-powerdns, body.layout-powerdns,
body.layout-rabbitmq, body.layout-rabbitmq,

View File

@ -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 theres 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.

View File

@ -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 = <<EOF
[
{
"escalation_delay_in_minutes": 10,
"targets": [
{
"type": "user",
"id": "${pagerduty_user.example.id}"
}
]
}
]
EOF
}
```
## Argument Reference
The following arguments are supported:
* `name` - (Required) The name of the escalation policy.
* `description` - (Optional) A human-friendly description of the escalation policy.
If not set, a placeholder of "Managed by Terraform" will be set.
* `num_loops` (Optional) The number of times the escalation policy will repeat after reaching the end of its escalation.
* `escalation_rules` (Required) A JSON array containing escalation rules. Each rule must have `escalation_delay_in_minutes` defined as well as an array containing `targets`
* `escalation_delay_in_minutes` (Required) The number of minutes before an unacknowledged incident escalates away from this rule.
* `targets` (Required) The targets an incident should be assigned to upon reaching this rule.
## Attributes Reference
The following attributes are exported:
* `id` - The ID of the escalation policy.
* `name` - The name of the escalation policy.
* `description` - Escalation policy description.
* `num_loops` - The number of times the escalation policy will repeat after reaching the end of its escalation.

View File

@ -0,0 +1,68 @@
---
layout: "pagerduty"
page_title: "PagerDuty: pagerduty_service"
sidebar_current: "docs-pagerduty-resource-service"
description: |-
Creates and manages a service in PagerDuty.
---
# pagerduty\_service
A [service](https://v2.developer.pagerduty.com/v2/page/api-reference#!/Services/get_services) represents something you monitor (like a web service, email service, or database service). It is a container for related incidents that associates them with escalation policies.
## 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 = <<EOF
[
{
"escalation_delay_in_minutes": 10,
"targets": [
{
"type": "user",
"id": "${pagerduty_user.example.id}"
}
]
}
]
EOF
}
resource "pagerduty_service" "example" {
name = "My Web App"
auto_resolve_timeout = 14400
acknowledgement_timeout = 600
escalation_policy = "${pagerduty_escalation_policy.example.id}"
}
```
## Argument Reference
The following arguments are supported:
* `name` - (Required) The name of the service.
* `description` - (Optional) A human-friendly description of the escalation policy.
If not set, a placeholder of "Managed by Terraform" will be set.
* `auto_resolve_timeout` (Optional) Time in seconds that an incident is automatically resolved if left open for that long. Value is "null" is the feature is disabled.
* `acknowledgement_timeout` (Optional) Time in seconds that an incident changes to the Triggered State after being Acknowledged. Value is "null" is the feature is disabled.
## Attributes Reference
The following attributes are exported:
* `id` - The ID of the service.
* `name` - (Required) The name of the service.
* `description` - The user-provided description of the service.
* `auto_resolve_timeout` Time in seconds that an incident is automatically resolved if left open for that long.
* `acknowledgement_timeout` (Optional) Time in seconds that an incident changes to the Triggered State after being Acknowledged.

View File

@ -0,0 +1,37 @@
---
layout: "pagerduty"
page_title: "PagerDuty: pagerduty_team"
sidebar_current: "docs-pagerduty-resource-team"
description: |-
Creates and manages a team in PagerDuty.
---
# pagerduty\_team
A [team](https://v2.developer.pagerduty.com/v2/page/api-reference#!/Teams/get_teams) is a collection of users and escalation policies that represent a group of people within an organization.
## Example Usage
```
resource "pagerduty_team" "example" {
name = "Engineering"
description = "All engineering"
}
```
## Argument Reference
The following arguments are supported:
* `name` - (Required) The name of the group.
* `description` - (Optional) A human-friendly description of the team.
If not set, a placeholder of "Managed by Terraform" will be set.
## Attributes Reference
The following attributes are exported:
* `id` - The ID of the team.
* `name` - The name of the team.
* `description` - The description of the team.

View File

@ -0,0 +1,55 @@
---
layout: "pagerduty"
page_title: "PagerDuty: pagerduty_user"
sidebar_current: "docs-pagerduty-resource-user"
description: |-
Creates and manages a user in PagerDuty.
---
# pagerduty\_user
A [user](https://v2.developer.pagerduty.com/v2/page/api-reference#!/Users/get_users) is a member of a PagerDuty account that have the ability to interact with incidents and other data on the account.
## Example Usage
```
resource "pagerduty_team" "example" {
name = "Engineering"
description = "All engineering"
}
resource "pagerduty_user" "example" {
name = "Earline Greenholt"
email = "125.greenholt.earline@graham.name"
teams = ["${pagerduty_team.example.id}"]
}
```
## Argument Reference
The following arguments are supported:
* `name` - (Optional) The name of the user.
* `description` - (Optional) A human-friendly description of the user.
If not set, a placeholder of "Managed by Terraform" will be set.
* `color` - (Optional) The schedule color for the user.
* `role` - (Optional) The user role. Can be `admin`, `limited_user`, `owner`, `read_only_user` or `user`
* `job_title` - (Optional) The user's title.
* `teams` - (Optional) A list of teams the user should belong to.
## Attributes Reference
The following attributes are exported:
* `id` - The ID of the user.
* `name` - The name of the user.
* `email` - The user's email address.
* `time_zone` - The preferred time zone name.
* `role` - The user role.
* `avatar_url` - The URL of the user's avatar.
* `description` - The user's bio.
* `invitation_sent` - If true, the user has an outstanding invitation.
* `job_title` - The user's title.
* `html_url` - URL at which the entity is uniquely displayed in the Web app
* `teams` - A list of teams the user belongs to

View File

@ -0,0 +1,35 @@
<% wrap_layout :inner do %>
<% content_for :sidebar do %>
<div class="docs-sidebar hidden-print affix-top" role="complementary">
<ul class="nav docs-sidenav">
<li<%= sidebar_current("docs-home") %>>
<a href="/docs/providers/index.html">&laquo; Documentation Home</a>
</li>
<li<%= sidebar_current("docs-pagerduty-index") %>>
<a href="/docs/providers/pagerduty/index.html">PagerDuty Provider</a>
</li>
<li<%= sidebar_current(/^docs-pagerduty-resource/) %>>
<a href="#">Resources</a>
<ul class="nav nav-visible">
<li<%= sidebar_current("docs-pagerduty-resource-user") %>>
<a href="/docs/providers/pagerduty/r/user.html">pagerduty_user</a>
</li>
<li<%= sidebar_current("docs-pagerduty-resource-team") %>>
<a href="/docs/providers/pagerduty/r/team.html">pagerduty_team</a>
</li>
<li<%= sidebar_current("docs-pagerduty-resource-escalation_policy") %>>
<a href="/docs/providers/pagerduty/r/escalation_policy.html">pagerduty_escalation_policy</a>
</li>
<li<%= sidebar_current("docs-pagerduty-resource-service") %>>
<a href="/docs/providers/pagerduty/r/service.html">pagerduty_service</a>
</li>
</ul>
</li>
</ul>
</div>
<% end %>
<%= yield %>
<% end %>