-
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.
fix validation
- Loading branch information
yacut
committed
Oct 21, 2020
1 parent
206bd93
commit cc477e0
Showing
12 changed files
with
288 additions
and
140 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
bin/ | ||
.terraform/ |
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,19 @@ | ||
# iLert Provider Examples | ||
|
||
This directory contains a set of examples of using various iLert resources with | ||
Terraform. The examples each have their own README containing more details | ||
on what the example does. | ||
|
||
To run any example, clone the repository and run `terraform init`, `terraform plan`, and `terraform apply` within | ||
the example's own directory. | ||
|
||
For example: | ||
|
||
```sh | ||
git clone https://github.com/iLert/terraform-provider-ilert | ||
cd terraform-provider-ilert/examples/alert_source | ||
terraform init | ||
terraform plan | ||
terraform apply | ||
... | ||
``` |
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 @@ | ||
# Alert Source Example | ||
|
||
This demos [alert sources](https://docs.ilert.com/getting-started/intro#alert-source-inbound-integration). | ||
|
||
This example will create an alert source in the specified organization. See https://registry.terraform.io/providers/iLert/ilert/latest/docs for details on configuring [`providers.tf`](./providers.tf) accordingly. | ||
|
||
Alternatively, you may use variables passed via command line: | ||
|
||
```sh | ||
export ILERT_ORGANIZATION= | ||
export ILERT_USERNAME= | ||
export ILERT_PASSWORD= | ||
``` | ||
|
||
```sh | ||
terraform apply \ | ||
-var "organization=${ILERT_ORGANIZATION}" \ | ||
-var "username=${ILERT_USERNAME}" \ | ||
-var "password=${ILERT_PASSWORD}" \ | ||
-var "escalation_policy=123456789 | ||
``` |
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 "ilert_alert_source" "example" { | ||
name = "My Grafana Integration from terraform" | ||
integration_type = "GRAFANA" | ||
escalation_policy = var.escalation_policy_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,14 @@ | ||
terraform { | ||
required_providers { | ||
ilert = { | ||
source = "iLert/ilert" | ||
version = "0.1.5" | ||
} | ||
} | ||
} | ||
|
||
provider "ilert" { | ||
organization = var.organization | ||
username = var.username | ||
password = var.password | ||
} |
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,45 @@ | ||
{ | ||
"version": 4, | ||
"terraform_version": "0.13.4", | ||
"serial": 7, | ||
"lineage": "8c0378c7-c3c6-22e1-754c-3483bb89f9f2", | ||
"outputs": {}, | ||
"resources": [ | ||
{ | ||
"mode": "managed", | ||
"type": "ilert_alert_source", | ||
"name": "example", | ||
"provider": "provider[\"registry.terraform.io/ilert/ilert\"]", | ||
"instances": [ | ||
{ | ||
"schema_version": 0, | ||
"attributes": { | ||
"active": true, | ||
"autotask_metadata": [], | ||
"dark_icon_url": "https://cdn.ilert.com/javax.faces.resource/source_icons/_dark/grafana.png.jsf?ln=images", | ||
"email_filtered": false, | ||
"email_predicates": [], | ||
"email_resolve_filtered": false, | ||
"email_resolve_predicates": [], | ||
"escalation_policy": "2195678", | ||
"filter_operator": "AND", | ||
"heartbeat": [], | ||
"icon_url": "https://cdn.ilert.com/javax.faces.resource/source_icons/grafana.png.jsf?ln=images", | ||
"id": "2208782", | ||
"incident_creation": "ONE_INCIDENT_PER_EMAIL", | ||
"incident_priority_rule": "HIGH", | ||
"integration_key": "il1gra1020fe0c6ef61f264937b782b84d9886cafd4c928ae1cf", | ||
"integration_type": "GRAFANA", | ||
"light_icon_url": "https://cdn.ilert.com/javax.faces.resource/source_icons/_light/grafana.png.jsf?ln=images", | ||
"name": "My Grafana Integration from terraform", | ||
"resolve_filter_operator": "AND", | ||
"resolve_key_extractor": [], | ||
"status": "ALL_RESOLVED", | ||
"support_hours": [] | ||
}, | ||
"private": "bnVsbA==" | ||
} | ||
] | ||
} | ||
] | ||
} |
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,23 @@ | ||
variable "organization" { | ||
description = "iLert organization used to configure the provider" | ||
type = string | ||
default = "yacut" | ||
} | ||
|
||
variable "username" { | ||
description = "iLert username used to configure the provider" | ||
type = string | ||
default = "yacut" | ||
} | ||
|
||
variable "password" { | ||
description = "iLert password used to configure the provider" | ||
type = string | ||
default = "kZjgEKL4guyCTQY" | ||
} | ||
|
||
variable "escalation_policy_id" { | ||
description = "iLert escalation policy id used for alert source" | ||
type = number | ||
default = 2195678 | ||
} |
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
Oops, something went wrong.