-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Terraform dashboard example of configuring a ServiceNow Cloud Observability Datasource
- Loading branch information
1 parent
138ff49
commit e8aec09
Showing
5 changed files
with
531 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,8 @@ e2e-results/ | |
# generated plugin | ||
dist/ | ||
releases/ | ||
|
||
# terraform | ||
.terraform* | ||
terraform.* | ||
*.tfvars |
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,21 @@ | ||
# Terraform Grafana Example | ||
|
||
This is an example of how you can use Terraform to create: | ||
|
||
- A Service Cloud Observability datasource | ||
- A dashboard with template variables and spans and logs panels | ||
|
||
|
||
To run: | ||
|
||
``` | ||
terraform apply -var-file=vars.tfvars | ||
``` | ||
|
||
Where the `vars.tfvars` specifies Grafana service account token and Cloud Observability API token: | ||
|
||
``` | ||
grafana_auth = "<service-account-token>" | ||
grafaha_host = "https://<grafana-host>" | ||
lighstep_api_key = "<cloud-observability-api-token>" | ||
``` |
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,15 @@ | ||
resource "grafana_data_source" "demo" { | ||
type = "servicenow-cloudobservability-datasource" | ||
name = "demo" | ||
uid = "snco-demo-ds-test-uid" | ||
url = "https://${var.lightstep_api_host}" | ||
json_data_encoded = jsonencode({ | ||
orgName = "LightStep" | ||
projectName = "demo" | ||
apiHost = var.lightstep_api_host | ||
}) | ||
|
||
secure_json_data_encoded = jsonencode({ | ||
apiKey = var.lighstep_api_key | ||
}) | ||
} |
Oops, something went wrong.