-
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.
Merge pull request #18 from STLVRTX:master
update provider to v2 api changes and add new incident com resources
- Loading branch information
Showing
60 changed files
with
3,685 additions
and
433 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 |
---|---|---|
|
@@ -3,4 +3,6 @@ bin/ | |
.terraform* | ||
terraform.tfstate* | ||
crash.log | ||
*.tfvars | ||
*.tfvars | ||
*.tfrc | ||
test/ |
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,16 @@ | ||
# Alert Action Example | ||
|
||
This demos [alert actions and connectors](https://docs.ilert.com/getting-started/intro#connectors-and-alert-actions-aka-outbound-integrations). | ||
|
||
This example will create an alert source, a connector and alert action 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_API_TOKEN= | ||
``` | ||
|
||
```sh | ||
terraform apply \ | ||
-var "api_token=${ILERT_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,36 @@ | ||
data "ilert_escalation_policy" "default" { | ||
name = "Default" | ||
} | ||
|
||
resource "ilert_alert_source" "example" { | ||
name = "My Grafana Integration for GitHub" | ||
integration_type = "GRAFANA" | ||
escalation_policy = data.ilert_escalation_policy.default.id | ||
} | ||
|
||
resource "ilert_connector" "example" { | ||
name = "My GitHub Connector" | ||
type = "github" | ||
|
||
github { | ||
api_key = "my api key" | ||
} | ||
} | ||
|
||
resource "ilert_alert_action" "example" { | ||
name = "My GitHub Alert Action" | ||
|
||
alert_source { | ||
id = ilert_alert_source.example.id | ||
} | ||
|
||
connector { | ||
id = ilert_connector.example.id | ||
type = ilert_connector.example.type | ||
} | ||
|
||
github { | ||
owner = "my org" | ||
repository = "my repo" | ||
} | ||
} |
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 { | ||
ilert = { | ||
source = "iLert/ilert" | ||
version = "~> 1.0" | ||
} | ||
} | ||
} | ||
|
||
provider "ilert" { | ||
endpoint = var.endpoint | ||
api_token = var.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,10 @@ | ||
variable "api_token" { | ||
description = "iLert API token used to configure the provider" | ||
type = string | ||
} | ||
|
||
variable "endpoint" { | ||
description = "iLert organization used to configure the provider" | ||
type = string | ||
default = "https://api.ilert.com" | ||
} |
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,14 +1,10 @@ | ||
variable "organization" { | ||
description = "iLert organization used to configure the provider" | ||
variable "api_token" { | ||
description = "iLert API token used to configure the provider" | ||
type = string | ||
} | ||
|
||
variable "username" { | ||
description = "iLert username used to configure the provider" | ||
type = string | ||
} | ||
|
||
variable "password" { | ||
description = "iLert password used to configure the provider" | ||
variable "endpoint" { | ||
description = "iLert organization used to configure the provider" | ||
type = string | ||
default = "https://api.ilert.com" | ||
} |
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,25 @@ | ||
data "ilert_escalation_policy" "default" { | ||
name = "Default" | ||
} | ||
|
||
data "ilert_service" "example" { | ||
name = "example" | ||
} | ||
|
||
resource "ilert_alert_source" "example" { | ||
name = "My Grafana Integration from terraform" | ||
integration_type = "GRAFANA" | ||
escalation_policy = data.ilert_escalation_policy.default.id | ||
} | ||
|
||
resource "ilert_automation_rule" "example" { | ||
alert_type = "CREATED" | ||
service_status = "OPERATIONAL" | ||
service { | ||
id = data.ilert_service.example.id | ||
} | ||
|
||
alert_source { | ||
id = ilert_alert_source.example.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,13 @@ | ||
terraform { | ||
required_providers { | ||
ilert = { | ||
source = "iLert/ilert" | ||
version = "~> 1.6" | ||
} | ||
} | ||
} | ||
|
||
provider "ilert" { | ||
endpoint = var.endpoint | ||
api_token = var.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,10 @@ | ||
variable "api_token" { | ||
description = "iLert API token used to configure the provider" | ||
type = string | ||
} | ||
|
||
variable "endpoint" { | ||
description = "iLert organization used to configure the provider" | ||
type = string | ||
default = "https://api.ilert.com" | ||
} |
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 |
---|---|---|
|
@@ -19,4 +19,3 @@ resource "ilert_escalation_policy" "example" { | |
user = data.ilert_user.example.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 |
---|---|---|
@@ -1,14 +1,10 @@ | ||
variable "organization" { | ||
description = "iLert organization used to configure the provider" | ||
variable "api_token" { | ||
description = "iLert API token used to configure the provider" | ||
type = string | ||
} | ||
|
||
variable "username" { | ||
description = "iLert username used to configure the provider" | ||
type = string | ||
} | ||
|
||
variable "password" { | ||
description = "iLert password used to configure the provider" | ||
variable "endpoint" { | ||
description = "iLert organization used to configure the provider" | ||
type = string | ||
default = "https://api.ilert.com" | ||
} |
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 "ilert_incident_template" "example" { | ||
name = "example" | ||
status = "INVESTIGATING" | ||
} |
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 { | ||
ilert = { | ||
source = "iLert/ilert" | ||
version = "~> 1.6" | ||
} | ||
} | ||
} | ||
|
||
provider "ilert" { | ||
endpoint = var.endpoint | ||
api_token = var.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,10 @@ | ||
variable "api_token" { | ||
description = "iLert API token used to configure the provider" | ||
type = string | ||
} | ||
|
||
variable "endpoint" { | ||
description = "iLert organization used to configure the provider" | ||
type = string | ||
default = "https://api.ilert.com" | ||
} |
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 @@ | ||
resource "ilert_team" "example"{ | ||
name = "example" | ||
} | ||
|
||
resource "ilert_service" "example" { | ||
name = "example" | ||
status = "OPERATIONAL" | ||
description = "example iLert service" | ||
|
||
team { | ||
id = ilert_team.example.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,13 @@ | ||
terraform { | ||
required_providers { | ||
ilert = { | ||
source = "iLert/ilert" | ||
version = "~> 1.6" | ||
} | ||
} | ||
} | ||
|
||
provider "ilert" { | ||
endpoint = var.endpoint | ||
api_token = var.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,10 @@ | ||
variable "api_token" { | ||
description = "iLert API token used to configure the provider" | ||
type = string | ||
} | ||
|
||
variable "endpoint" { | ||
description = "iLert organization used to configure the provider" | ||
type = string | ||
default = "https://api.ilert.com" | ||
} |
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 @@ | ||
data "ilert_service" "example" { | ||
name = "example" | ||
} | ||
|
||
resource "ilert_status_page" "example" { | ||
name = "example" | ||
subdomain = "example.ilerthq.com" | ||
visibility = "PUBLIC" | ||
|
||
service { | ||
id = data.ilert_service.example.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,13 @@ | ||
terraform { | ||
required_providers { | ||
ilert = { | ||
source = "iLert/ilert" | ||
version = "~> 1.6" | ||
} | ||
} | ||
} | ||
|
||
provider "ilert" { | ||
endpoint = var.endpoint | ||
api_token = var.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,10 @@ | ||
variable "api_token" { | ||
description = "iLert API token used to configure the provider" | ||
type = string | ||
} | ||
|
||
variable "endpoint" { | ||
description = "iLert organization used to configure the provider" | ||
type = string | ||
default = "https://api.ilert.com" | ||
} |
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 |
---|---|---|
|
@@ -15,4 +15,3 @@ resource "ilert_uptime_monitor" "terraform" { | |
url = "https://www.terraform.io" | ||
} | ||
} | ||
|
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,14 +1,10 @@ | ||
variable "organization" { | ||
description = "iLert organization used to configure the provider" | ||
variable "api_token" { | ||
description = "iLert API token used to configure the provider" | ||
type = string | ||
} | ||
|
||
variable "username" { | ||
description = "iLert username used to configure the provider" | ||
type = string | ||
} | ||
|
||
variable "password" { | ||
description = "iLert password used to configure the provider" | ||
variable "endpoint" { | ||
description = "iLert organization used to configure the provider" | ||
type = string | ||
default = "https://api.ilert.com" | ||
} |
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,14 +1,10 @@ | ||
variable "organization" { | ||
description = "iLert organization used to configure the provider" | ||
variable "api_token" { | ||
description = "iLert API token used to configure the provider" | ||
type = string | ||
} | ||
|
||
variable "username" { | ||
description = "iLert username used to configure the provider" | ||
type = string | ||
} | ||
|
||
variable "password" { | ||
description = "iLert password used to configure the provider" | ||
variable "endpoint" { | ||
description = "iLert organization used to configure the provider" | ||
type = string | ||
default = "https://api.ilert.com" | ||
} |
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.