-
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.
- Loading branch information
impart-security
committed
Mar 28, 2024
1 parent
a9244bd
commit cde1b28
Showing
44 changed files
with
9,431 additions
and
82 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 |
---|---|---|
@@ -1 +1 @@ | ||
0.3.0 | ||
0.4.0 |
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,33 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "impart_connector Data Source - impart" | ||
subcategory: "" | ||
description: |- | ||
Manage a connector. | ||
--- | ||
|
||
# impart_connector (Data Source) | ||
|
||
Manage a connector. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
# Read in an existing specification | ||
data "impart_connector" "example_connector" { | ||
id = "<id>" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `id` (String) Identifier for this connector. | ||
|
||
### Optional | ||
|
||
- `connector_type_id` (String) ID of the connector type (eg. ID for our Slack or Jira connector types). | ||
- `is_connected` (Boolean) Whether or not the connector is authenticated via OAuth2. | ||
- `name` (String) Name for this connector. |
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,94 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "impart_monitor Resource - impart" | ||
subcategory: "" | ||
description: |- | ||
Manage a monitor. | ||
--- | ||
|
||
# impart_monitor (Resource) | ||
|
||
Manage a monitor. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
# Create a new event monitor | ||
resource "impart_monitor" "test_event" { | ||
name = "terraform_event_monitor" | ||
description = "test event monitor" | ||
notification_template_ids = [impart_notification_template.test.id] | ||
conditions = [ | ||
{ | ||
threshold = 1, | ||
comparator = "gt", | ||
time_period = 60000, | ||
delay = 0, | ||
details = { | ||
type = "event", | ||
action = "api_access_token_created", | ||
subject_type = "api_access_token_id", | ||
actor_type = "user_id" | ||
} | ||
} | ||
] | ||
} | ||
# Create a new metric monitor | ||
resource "impart_monitor" "test_metric" { | ||
name = "terraform_event_monitor" | ||
description = "test event monitor" | ||
notification_template_ids = [impart_notification_template.test.id] | ||
conditions = [ | ||
{ | ||
threshold = 1, | ||
comparator = "lt", | ||
time_period = 60000, | ||
delay = 0, | ||
details = { | ||
type = "metric", | ||
tag = "http-request" | ||
} | ||
} | ||
] | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `conditions` (Attributes List) An array of conditions for which the monitor will trigger. (see [below for nested schema](#nestedatt--conditions)) | ||
- `description` (String) The description for this monitor. | ||
- `name` (String) The name for this monitor. | ||
- `notification_template_ids` (List of String) An array of notification template ids for the templates that will send notifications to their respective connectors. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) Identifier for this monitor. | ||
|
||
<a id="nestedatt--conditions"></a> | ||
### Nested Schema for `conditions` | ||
|
||
Required: | ||
|
||
- `comparator` (String) Greater than, equal to, or less than (should be one of 'gt', 'lt', or 'eq') | ||
- `delay` (Number) In milliseconds, the offset from now() for the time window. | ||
- `details` (Attributes) (see [below for nested schema](#nestedatt--conditions--details)) | ||
- `threshold` (Number) Number of occurrences that need to execute to have this condition be true. | ||
- `time_period` (Number) In milliseconds, the time span from now until when we should be counting events (for example, 60000 is all events in the last minute). | ||
|
||
<a id="nestedatt--conditions--details"></a> | ||
### Nested Schema for `conditions.details` | ||
|
||
Required: | ||
|
||
- `type` (String) The type of monitor (should be one of 'event' or 'metric' | ||
|
||
Optional: | ||
|
||
- `action` (String) Strictly for event type monitors. A slug of the action the monitor is tracking. | ||
- `actor_type` (String) Strictly for event type monitors. A slug of the actor type the monitor is tracking. | ||
- `subject_type` (String) Strictly for event type monitors. A slug of the subject type the monitor is tracking. | ||
- `tag` (String) Strictly for metric type monitors. The tag the monitor is tracking. |
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: "impart_notification_template Resource - impart" | ||
subcategory: "" | ||
description: |- | ||
Manage an notification template. | ||
--- | ||
|
||
# impart_notification_template (Resource) | ||
|
||
Manage an notification template. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
# Create a new notification template | ||
resource "impart_notification_template" "example" { | ||
name = "notification_template_example" | ||
connector_id = resource.impart_connector.example_connector.id | ||
payload = "This is a test message payload" | ||
subject = "Test subject" | ||
destination = ["test-destination-id"] | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `connector_id` (String) The connector id. | ||
- `destination` (List of String) An array of destination ids to which the payloads will be sent. | ||
- `name` (String) The name for this notification template. | ||
- `payload` (String) The payload message that will be sent to the Third Party API. | ||
- `subject` (String) The subject message that will be sent to the Third Party API. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) Identifier for this notification template. |
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 @@ | ||
# Read in an existing specification | ||
data "impart_connector" "example_connector" { | ||
id = "<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
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 @@ | ||
# Create a new event monitor | ||
resource "impart_monitor" "test_event" { | ||
name = "terraform_event_monitor" | ||
description = "test event monitor" | ||
notification_template_ids = [impart_notification_template.test.id] | ||
conditions = [ | ||
{ | ||
threshold = 1, | ||
comparator = "gt", | ||
time_period = 60000, | ||
delay = 0, | ||
details = { | ||
type = "event", | ||
action = "api_access_token_created", | ||
subject_type = "api_access_token_id", | ||
actor_type = "user_id" | ||
} | ||
} | ||
] | ||
} | ||
|
||
# Create a new metric monitor | ||
resource "impart_monitor" "test_metric" { | ||
name = "terraform_event_monitor" | ||
description = "test event monitor" | ||
notification_template_ids = [impart_notification_template.test.id] | ||
conditions = [ | ||
{ | ||
threshold = 1, | ||
comparator = "lt", | ||
time_period = 60000, | ||
delay = 0, | ||
details = { | ||
type = "metric", | ||
tag = "http-request" | ||
} | ||
} | ||
] | ||
} |
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,8 @@ | ||
# Create a new notification template | ||
resource "impart_notification_template" "example" { | ||
name = "notification_template_example" | ||
connector_id = resource.impart_connector.example_connector.id | ||
payload = "This is a test message payload" | ||
subject = "Test subject" | ||
destination = ["test-destination-id"] | ||
} |
Oops, something went wrong.