-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from appoptics/upgrade-to-0.12
Update to 0.13, update deps, and fix alert updates.
- Loading branch information
Showing
2,052 changed files
with
956 additions
and
732,759 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
* 2020-08-17: Updating to terraform 0.13 library to accommodate 0.12+ versions of terraform | ||
|
||
In this update, metrics now require a "type" argument to reflect the | ||
type of the metric as either "gauge" or "composite"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
// This example is for the 0.11 terraform-compatible version | ||
// of the provider. | ||
|
||
// Used to identify all things made in integration test runs | ||
variable "tf-name-fragment" { | ||
type = "string" | ||
type = "string" | ||
default = "tf_provider_test" | ||
} | ||
|
||
variable "test-metric-name" { | ||
type = "string" | ||
type = "string" | ||
default = "tf_provider_test.cpu.percent.used" // can't interpolate into variables | ||
} | ||
|
||
|
@@ -26,9 +29,9 @@ resource "appoptics_dashboard" "test_dashboard" { | |
// | ||
// Notification Service | ||
// | ||
resource "appoptics_notification_service" "test_service"{ | ||
title = "${var.tf-name-fragment} Email Notification Service" | ||
type = "mail" | ||
resource "appoptics_notification_service" "test_service" { | ||
title = "${var.tf-name-fragment} Email Notification Service" | ||
type = "mail" | ||
settings = <<EOF | ||
{ | ||
"addresses": "[email protected]" | ||
|
@@ -39,40 +42,40 @@ EOF | |
// | ||
// Metric | ||
// | ||
resource "appoptics_metric" "test_metric"{ | ||
name = "${var.test-metric-name}" | ||
resource "appoptics_metric" "test_metric" { | ||
name = "${var.test-metric-name}" | ||
display_name = "Terraform Test CPU Utilization" | ||
period = 60 | ||
type = "gauge" | ||
period = 60 | ||
type = "gauge" | ||
attributes = { | ||
color = "#A3BE8C" | ||
summarize_function = "average" | ||
display_max = 100.0 | ||
display_units_long = "CPU Utilization Percent" | ||
color = "#A3BE8C" | ||
summarize_function = "average" | ||
display_max = 100.0 | ||
display_units_long = "CPU Utilization Percent" | ||
display_units_short = "cpu %" | ||
} | ||
} | ||
|
||
// | ||
// Chart | ||
// | ||
resource "appoptics_dashboard_chart" "test_chart"{ | ||
space_id = "${appoptics_dashboard.test_dashboard.id}" | ||
name = "Test Chart" | ||
resource "appoptics_dashboard_chart" "test_chart" { | ||
space_id = "${appoptics_dashboard.test_dashboard.id}" | ||
name = "Test Chart" | ||
depends_on = ["appoptics_metric.test_metric"] | ||
min = 0 | ||
max = 100 | ||
label = "Used" | ||
min = 0 | ||
max = 100 | ||
label = "Used" | ||
|
||
stream { | ||
metric = "${appoptics_metric.test_metric.name}" | ||
color = "#fa7268" | ||
metric = "${appoptics_metric.test_metric.name}" | ||
color = "#fa7268" | ||
units_short = "%" | ||
units_long = "Percentage used" | ||
units_long = "Percentage used" | ||
|
||
tags = [{ | ||
name = "environment" | ||
values = ["staging"] | ||
name = "environment" | ||
values = ["staging"] | ||
}] | ||
} | ||
} | ||
|
@@ -81,17 +84,17 @@ resource "appoptics_dashboard_chart" "test_chart"{ | |
// Alert | ||
// | ||
resource "appoptics_alert" "test_alert" { | ||
name = "${var.tf-name-fragment}.Alert" | ||
description = "Managed by Terraform" | ||
name = "${var.tf-name-fragment}.Alert" | ||
description = "Managed by Terraform" | ||
rearm_seconds = 10800 | ||
|
||
depends_on = ["appoptics_metric.test_metric"] | ||
|
||
condition { | ||
type = "above" | ||
threshold = 0 | ||
metric_name = "${var.test-metric-name}" | ||
duration = 60 | ||
type = "above" | ||
threshold = 0 | ||
metric_name = "${var.test-metric-name}" | ||
duration = 60 | ||
summary_function = "sum" | ||
|
||
tag { | ||
|
@@ -107,4 +110,4 @@ resource "appoptics_alert" "test_alert" { | |
} | ||
|
||
} | ||
} | ||
} |
Oops, something went wrong.