Skip to content

Commit

Permalink
website/docs: Run terraform fmt on code examples (#12075)
Browse files Browse the repository at this point in the history
* docs/vsphere: Fix code block

* docs: Convert `...` to `# ...` to allow `terraform fmt`ing

* docs: Trim trailing whitespace

* docs: First-pass run of `terraform fmt` on code examples
  • Loading branch information
gechr authored and stack72 committed Feb 18, 2017
1 parent 190f700 commit 3417973
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 23 deletions.
6 changes: 3 additions & 3 deletions index.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ Use the navigation to the left to read about the available resources.
```
# Configure the Librato provider
provider "librato" {
email = "ops@company.com"
token = "${var.librato_token}"
email = "ops@company.com"
token = "${var.librato_token}"
}
# Create a new space
resource "librato_space" "default" {
...
# ...
}
```

Expand Down
19 changes: 10 additions & 9 deletions r/alert.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ create and manage alerts on Librato.
```
# Create a new Librato alert
resource "librato_alert" "myalert" {
name = "MyAlert"
description = "A Test Alert"
services = [ "${librato_service.myservice.id}" ]
condition {
type = "above"
threshold = 10
metric_name = "librato.cpu.percent.idle"
}
name = "MyAlert"
description = "A Test Alert"
services = ["${librato_service.myservice.id}"]
condition {
type = "above"
threshold = 10
metric_name = "librato.cpu.percent.idle"
}
}
```

Expand Down Expand Up @@ -55,7 +56,7 @@ Conditions (`condition`) support the following:

* `type` - The type of condition. Must be one of `above`, `below` or `absent`.
* `metric_name`- The name of the metric this alert condition applies to.
* `source`- A source expression which identifies which sources for the given metric to monitor.
* `source`- A source expression which identifies which sources for the given metric to monitor.
* `detect_reset` - boolean: toggles the method used to calculate the delta from the previous sample when the summary_function is `derivative`.
* `duration` - number of seconds condition must be true to fire the alert (required for type `absent`).
* `threshold` - float: measurements over this number will fire the alert (only for `above` or `below`).
Expand Down
7 changes: 4 additions & 3 deletions r/service.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ create and manage notification services on Librato.
```
# Create a new Librato service
resource "librato_service" "email" {
title = "Email the admins"
type = "mail"
settings = <<EOF
title = "Email the admins"
type = "mail"
settings = <<EOF
{
"addresses": "admin@example.com"
}
Expand Down
2 changes: 1 addition & 1 deletion r/space.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ create and manage spaces on Librato.
```
# Create a new Librato space
resource "librato_space" "default" {
name = "My New Space"
name = "My New Space"
}
```

Expand Down
14 changes: 7 additions & 7 deletions r/space_chart.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ create and manage charts in Librato Spaces.
```
# Create a new Librato space
resource "librato_space" "my_space" {
name = "My New Space"
name = "My New Space"
}
# Create a new chart
resource "librato_space_chart" "server_temperature" {
name = "Server Temperature"
name = "Server Temperature"
space_id = "${librato_space.my_space.id}"
stream {
Expand All @@ -30,15 +30,15 @@ resource "librato_space_chart" "server_temperature" {
}
stream {
metric = "environmental_temp"
source = "*"
group_function = "breakout"
metric = "environmental_temp"
source = "*"
group_function = "breakout"
summary_function = "average"
}
stream {
metric = "server_temp"
source = "%"
metric = "server_temp"
source = "%"
group_function = "average"
}
}
Expand Down

0 comments on commit 3417973

Please sign in to comment.