-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add dev examples and tests to verify that their schema loads and plan…
…s work
- Loading branch information
Showing
125 changed files
with
1,197 additions
and
20 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 @@ | ||
../notifiers/email.tf |
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,11 @@ | ||
resource "chronosphere_bucket" "b" { | ||
name = "${var.prefix} bucket" | ||
notification_policy_data = chronosphere_notification_policy.np.notification_policy_data | ||
} | ||
|
||
resource "chronosphere_notification_policy" "np" { | ||
route { | ||
severity = "warn" | ||
notifiers = [chronosphere_email_alert_notifier.email.id] | ||
} | ||
} |
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 @@ | ||
../prefix.tf |
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 @@ | ||
../version.tf |
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,5 @@ | ||
resource "chronosphere_bucket" "b" { | ||
name = "${var.prefix} Bucket" | ||
description = "${var.prefix} bucket created by terraform dev/examples" | ||
labels = { "foo" : "bar" } | ||
} |
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 @@ | ||
../prefix.tf |
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 @@ | ||
../version.tf |
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,9 @@ | ||
resource "chronosphere_team" "t" { | ||
name = "${var.prefix} team" | ||
} | ||
|
||
resource "chronosphere_collection" "c" { | ||
name = "${var.prefix} Bucket" | ||
team_id = chronosphere_team.t.id | ||
description = "${var.prefix} collection created by terraform dev/examples" | ||
} |
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,22 @@ | ||
resource "chronosphere_classic_dashboard" "my_dashboard" { | ||
collection_id = chronosphere_collection.c.id | ||
dashboard_json = jsonencode({ | ||
title : "${var.prefix} Dashboard", | ||
panels : [{ | ||
"gridPos" : { | ||
"h" : 12, | ||
"w" : 24, | ||
"x" : 0, | ||
"y" : 0 | ||
}, | ||
id : 2, | ||
targets : [ | ||
{ | ||
expr : "1", | ||
} | ||
], | ||
title : "Panel Title", | ||
type : "graph", | ||
}], | ||
}) | ||
} |
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 @@ | ||
../prefix.tf |
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 @@ | ||
../version.tf |
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 @@ | ||
resource "chronosphere_collection" "infra" { | ||
name = "${var.prefix} Infrastructure Collection" | ||
description = "Collection of resources related to infrastructure services." | ||
} |
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 @@ | ||
../prefix.tf |
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 @@ | ||
../version.tf |
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 @@ | ||
../notifiers/email.tf |
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,17 @@ | ||
resource "chronosphere_notification_policy" "np" { | ||
team_id = chronosphere_team.t.id | ||
name = "${var.prefix} team NP" | ||
|
||
route { | ||
severity = "warn" | ||
notifiers = [chronosphere_email_alert_notifier.email.id] | ||
} | ||
} | ||
|
||
resource "chronosphere_collection" "infra" { | ||
name = "${var.prefix} Infrastructure Collection" | ||
team_id = chronosphere_team.t.id | ||
description = "Collection of resources related to infrastructure services." | ||
|
||
notification_policy_id = chronosphere_notification_policy.np.id | ||
} |
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 @@ | ||
../prefix.tf |
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 @@ | ||
../teams/main.tf |
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 @@ | ||
../version.tf |
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,5 @@ | ||
resource "chronosphere_collection" "infra" { | ||
name = "${var.prefix} Infrastructure Collection" | ||
description = "Collection of resources related to infrastructure services." | ||
team_id = chronosphere_team.t.id | ||
} |
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 @@ | ||
../prefix.tf |
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 @@ | ||
../teams/main.tf |
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 @@ | ||
../version.tf |
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,5 @@ | ||
resource "chronosphere_collection" "c" { | ||
name = "${var.prefix} Collection" | ||
description = "collection created by terraform dev/examples." | ||
team_id = chronosphere_team.t.id | ||
} |
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,12 @@ | ||
resource "chronosphere_dashboard" "my_dashboard" { | ||
slug = "slug" | ||
collection_id = chronosphere_collection.c.id | ||
dashboard_json = jsonencode({ | ||
kind : "Dashboard", | ||
metadata : { | ||
name : "Test Chrono Managed: Native Dashboard" | ||
} | ||
spec : { | ||
} | ||
}) | ||
} |
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,5 @@ | ||
variable "prefix" { | ||
type = string | ||
default = "TF" | ||
} | ||
|
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 @@ | ||
resource "chronosphere_team" "t" { | ||
name = "${var.prefix} Team" | ||
description = "Optional ${var.prefix} Team Description" | ||
} |
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,13 @@ | ||
terraform { | ||
required_providers { | ||
chronosphere = { | ||
# Version used by "make install" to simplify development. | ||
version = "0.0.1-dev" | ||
source = "local/chronosphereio/chronosphere" | ||
|
||
# To use the registry, update the version above and uncomment | ||
# the source line below: | ||
# source = "tf-registry.chronosphere.io/chronosphere/chronosphere" | ||
} | ||
} | ||
} |
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,9 @@ | ||
data "chronosphere_bucket" "default1" { | ||
name = "Default" | ||
} | ||
|
||
|
||
data "chronosphere_bucket" "default2" { | ||
slug = "default" | ||
} | ||
|
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 @@ | ||
../prefix.tf |
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 @@ | ||
../version.tf |
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,3 @@ | ||
data "chronosphere_collection" "default" { | ||
slug = "default" | ||
} |
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 @@ | ||
../version.tf |
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,87 @@ | ||
resource "chronosphere_dataset" "example_prod_payfe" { | ||
name = "${var.prefix} Production paymentfe Traces" | ||
description = "Traces passing through the paymentfe service in production" | ||
configuration { | ||
type = "TRACES" | ||
|
||
trace_dataset { | ||
match_criteria { | ||
span { | ||
duration { | ||
max_secs = 99 | ||
min_secs = 1 | ||
} | ||
|
||
error { | ||
value = true | ||
} | ||
|
||
match_type = "INCLUDE" | ||
|
||
operation { | ||
value = "importantop" | ||
match = "EXACT" | ||
} | ||
|
||
parent_operation { | ||
value = "payments/.*" | ||
match = "REGEX" | ||
} | ||
|
||
parent_service { | ||
value = "frontdoor-[east|west]" | ||
match = "REGEX" | ||
} | ||
|
||
service { | ||
value = "importantsvc" | ||
match = "EXACT" | ||
} | ||
|
||
span_count { | ||
max = 2 | ||
min = 1 | ||
} | ||
|
||
tag { | ||
key = "cool_tag" | ||
|
||
value { | ||
value = "coolvalue" | ||
match = "EXACT" | ||
} | ||
} | ||
|
||
tag { | ||
key = "env_tag" | ||
|
||
value { | ||
value = "prod.*" | ||
match = "REGEX" | ||
} | ||
} | ||
|
||
tag { | ||
key = "http.status_code" | ||
|
||
numeric_value { | ||
comparison = "GREATER_THAN" | ||
value = 299 | ||
} | ||
} | ||
} | ||
|
||
trace { | ||
duration { | ||
max_secs = 10 | ||
min_secs = 5 | ||
} | ||
|
||
error { | ||
value = true | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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 @@ | ||
../prefix.tf |
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 @@ | ||
../version.tf |
Oops, something went wrong.