generated from hashicorp/terraform-provider-scaffolding-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(provider): initial signoz terraform provider and alert support (#8)
#### Features - Alerts as code Signed-off-by: Prashant Shahi <[email protected]>
- Loading branch information
1 parent
c8b90d5
commit fb42bc0
Showing
47 changed files
with
2,422 additions
and
779 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,15 @@ | ||
#### Features | ||
|
||
- <Add Feature> | ||
|
||
#### Fixes | ||
|
||
- <Add Fix> | ||
|
||
#### Refactors | ||
|
||
- <Add Refactor> | ||
|
||
#### Tests | ||
|
||
- <Add Test> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
|
@@ -24,4 +24,4 @@ linters: | |
- unconvert | ||
- unparam | ||
- unused | ||
- vet | ||
- govet |
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "signoz_alert Data Source - signoz" | ||
subcategory: "" | ||
description: |- | ||
Fetches an alert from Signoz using its ID. The ID can be found in the URL of the alert in the Signoz UI. | ||
--- | ||
|
||
# signoz_alert (Data Source) | ||
|
||
Fetches an alert from Signoz using its ID. The ID can be found in the URL of the alert in the Signoz UI. | ||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `id` (String) ID of the alert. | ||
|
||
### Read-Only | ||
|
||
- `alert` (String) Name of the alert. | ||
- `alert_type` (String) Type of the alert. Possible values are: METRIC_BASED_ALERT, LOGS_BASED_ALERT, TRACES_BASED_ALERT, and EXCEPTIONS_BASED_ALERT. | ||
- `broadcast_to_all` (Boolean) Whether to broadcast the alert to all the alert channels. | ||
- `condition` (String) Condition of the alert. | ||
- `description` (String) Description of the alert. | ||
- `disabled` (Boolean) Whether the alert is disabled. | ||
- `eval_window` (String) Evaluation window of the alert. | ||
- `frequency` (String) Frequency of the alert. | ||
- `labels` (Map of String) Labels of the alert. Severity is a required label. | ||
- `preferred_channels` (List of String) List of preferred channels of the alert. This is a noop if BroadcastToAll is true. | ||
- `rule_type` (String) Type of the Alert Rule for threshold. Possible values are: threshold_rule and promql_rule. | ||
- `severity` (String) Severity of the alert. | ||
- `source` (String) Source URL of the alert. | ||
- `state` (String) State of the alert. Possible values are: inactive, firing, pending, and disabled. | ||
- `summary` (String) Summary of the alert. | ||
- `version` (String) Version of the alert. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,46 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "signoz_alert Resource - signoz" | ||
subcategory: "" | ||
description: |- | ||
Creates and manages alert resources in SigNoz. | ||
--- | ||
|
||
# signoz_alert (Resource) | ||
|
||
Creates and manages alert resources in SigNoz. | ||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `alert` (String) Name of the alert. | ||
- `alert_type` (String) Type of the alert. Possible values are: METRIC_BASED_ALERT, LOGS_BASED_ALERT, TRACES_BASED_ALERT, and EXCEPTIONS_BASED_ALERT. | ||
- `condition` (String) Condition of the alert. | ||
- `severity` (String) Severity of the alert. Possible values are: info, warning, error, and critical. | ||
|
||
### Optional | ||
|
||
- `broadcast_to_all` (Boolean) Whether to broadcast the alert to all the alerting channels. By default, the alert is only sent to the preferred channels. | ||
- `description` (String) Description of the alert. | ||
- `disabled` (Boolean) Whether the alert is disabled. | ||
- `eval_window` (String) The evaluation window of the alert. By default, it is 5m0s. | ||
- `frequency` (String) The frequency of the alert. By default, it is 1m0s. | ||
- `labels` (Map of String) Labels of the alert. Severity is a required label. | ||
- `preferred_channels` (List of String) Preferred channels of the alert. By default, it is empty. | ||
- `rule_type` (String) Type of the alert. Possible values are: threshold_rule and promql_rule. | ||
- `source` (String) Source of the alert. By default, it is <SIGNOZ_ENDPOINT>/alerts. | ||
- `summary` (String) Summary of the alert. | ||
- `version` (String) Version of the alert. By default, it is v4. | ||
|
||
### Read-Only | ||
|
||
- `create_at` (String) Creation time of the alert. | ||
- `create_by` (String) Creator of the alert. | ||
- `id` (String) Autogenerated unique ID for the alert. | ||
- `state` (String) State of the alert. | ||
- `update_at` (String) Last update time of the alert. | ||
- `update_by` (String) Last updater of the alert. |
This file was deleted.
Oops, something went wrong.
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,20 @@ | ||
terraform { | ||
required_providers { | ||
signoz = { | ||
source = "registry.terraform.io/signoz/signoz" | ||
} | ||
} | ||
} | ||
|
||
provider "signoz" { | ||
endpoint = "http://localhost:3301" | ||
# access_token = "ACCESS_TOKEN" | ||
} | ||
|
||
data "signoz_alert" "get_alert" { | ||
id = "5" | ||
} | ||
|
||
output "alert" { | ||
value = data.signoz_alert.get_alert | ||
} |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
terraform { | ||
required_providers { | ||
signoz = { | ||
source = "registry.terraform.io/signoz/signoz" | ||
} | ||
} | ||
} | ||
provider "signoz" {} | ||
|
||
data "signoz_alert" "example" {} |
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,3 +1,3 @@ | ||
provider "scaffolding" { | ||
provider "signoz" { | ||
# example configuration here | ||
} |
Oops, something went wrong.