Skip to content

Commit

Permalink
fix(swo_notification): typo in auth_header_name (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
grepory committed Sep 12, 2024
1 parent abaea6b commit 49ba117
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 37 deletions.
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ provider "swo" {
### Required

- `api_token` (String, Sensitive) The api token for the SWO account.
- `base_url` (String) The base url to use for requests to the server.

### Optional

- `base_url` (String) The base url to use for requests to the server.
- `debug_mode` (Boolean) Setting to true will provide additional logging details.
- `request_timeout` (Number) The request timeout period in seconds. Default is 30 seconds.
47 changes: 22 additions & 25 deletions docs/resources/alert.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "swo_alert Resource - terraform-provider-swo"
subcategory: ""
description: |-
A terraform resource for managing alerts.
A Terraform resource for managing alerts.
---

# swo_alert (Resource)

A terraform resource for managing alerts.
A Terraform resource for managing alerts.

## Example Usage

Expand Down Expand Up @@ -43,64 +43,61 @@ resource "swo_alert" "https_response_time" {
exclude_tags = []
},
]
notifications = [swo_notification.msteams.id, swo_notification.opsgenie.id]
notifications = [swo_notification.msteams.id, swo_notification.opsgenie.id]
trigger_reset_actions = true
}
```

<!-- schema generated by tfplugindocs -->

## Schema

### Required

- `conditions` (Attributes Set) One or more conditions that must be met to trigger the alert. (see [below for nested schema](#nestedatt--conditions))
- `name` (String) Alert definition name.
- `notifications` (List of String) A list of notifications to assign to this alert.
- `severity` (String) Alert definition severity. Valid values are [`INFO`|`WARNING`|`CRITICAL`].
- `conditions` (Attributes Set) One or more conditions that must be met to trigger the alert. These conditions are evaluated as a logical AND. (see [below for nested schema](#nestedatt--conditions))
- `name` (String) Alert name.
- `notifications` (List of String) A list of notifications that should be triggered for this alert.
- `severity` (String) Alert severity. Valid values are [`INFO`|`WARNING`|`CRITICAL`].

### Optional

- `description` (String) Alert definition description.
- `enabled` (Boolean) Enabled whether Alert definition shall be evaluated. Default is `true`.
- `trigger_reset_actions` (Boolean) A flag indicating whether to send a notification when active alert returns to normal. It will be set to false if not specified.
- `description` (String) Alert description.
- `enabled` (Boolean) True if the Alert should be evaluated. Default is `true`.
- `trigger_reset_actions` (Boolean) True if a notification should be sent when an active alert returns to normal. Default is false. Default is `false`.

### Read-Only

- `id` (String) The Id of the resource provided by the backend.

<a id="nestedatt--conditions"></a>

### Nested Schema for `conditions`

Required:

- `aggregation_type` (String) The aggregation type that will be applied to the metric and duration. Valid values are [`AVG`|`COUNT`|`LAST`|`MAX`|`MIN`|`SUM`].
- `duration` (String) Duration of time that will be used to check if the threshold has been breached.
- `aggregation_type` (String) The aggregation function that will be applied to the metric. Valid values are [`AVG`|`COUNT`|`LAST`|`MAX`|`MIN`|`SUM`].
- `duration` (String) How long the threshold has been met before triggering an alert.
- `metric_name` (String) The field name of the metric to be filtered on.
- `target_entity_types` (List of String) The entity types for scoping this alert (e.g. Website, Host, Database...).
- `threshold` (String) Operator and value that represents the threshold of an the alert. When the threshold is breached it triggers the alert. For Operator - binaryOperator:(=|!=|>|<|>=|<=), logicalOperator:(AND|OR)
- `target_entity_types` (List of String) The entity types that the alert will be applied to.
- `threshold` (String) Operator and value that represent the threshold of an the alert. When the threshold is breached it triggers the alert. For Operator - binaryOperator:(=|!=|>|<|>=|<=), logicalOperator:(AND|OR) E.g. '>=10'

Optional:

- `entity_ids` (List of String) A list of Entity IDs that will be used to filter on by the alert.
- `exclude_tags` (Attributes Set) List of tag key-value pairs that should be excluded from the alert. (see [below for nested schema](#nestedatt--conditions--exclude_tags))
- `include_tags` (Attributes Set) List of tag key-value pairs that should be included in the alert. (see [below for nested schema](#nestedatt--conditions--include_tags))
- `entity_ids` (List of String) A list of Entity IDs that will be used to filter on the alert. The alert will only trigger if the alert matches one or more of the entity IDs.
- `exclude_tags` (Attributes Set) Tag key and values to match in order to not trigger an alert. (see [below for nested schema](#nestedatt--conditions--exclude_tags))
- `include_tags` (Attributes Set) Tag key and values to match in order to trigger an alert. (see [below for nested schema](#nestedatt--conditions--include_tags))

<a id="nestedatt--conditions--exclude_tags"></a>

### Nested Schema for `conditions.exclude_tags`

Optional:

- `name` (String) Tag name that should be matched.
- `values` (List of String) Tag values that should be excluded from the alert.
- `name` (String) Tag key to match.
- `values` (List of String) Values to match.

<a id="nestedatt--conditions--include_tags"></a>

<a id="nestedatt--conditions--include_tags"></a>
### Nested Schema for `conditions.include_tags`

Optional:

- `name` (String) Tag name that should be matched.
- `values` (List of String) Tag values that should be included in the alert.
- `name` (String) Tag key to match.
- `values` (List of String) Values to match.
10 changes: 5 additions & 5 deletions docs/resources/apitoken.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "swo_apitoken Resource - terraform-provider-swo"
subcategory: ""
description: |-
A terraform resource for managing api tokens.
A terraform resource for managing API tokens.
---

# swo_apitoken (Resource)

A terraform resource for managing api tokens.
A terraform resource for managing API tokens.

## Example Usage

Expand All @@ -35,10 +35,10 @@ resource "swo_apitoken" "test" {

### Optional

- `access_level` (String) The access level of the token. Valid values are [`FULL`|`READ`|`RECORD`]. Default is `FULL`.
- `access_level` (String) The access level of the token. Valid values are [`FULL`|`READ`|`RECORD`|`API_FULL`]. Default is `FULL`.
- `attributes` (Attributes Set) The custom attributes assigned to the token. (see [below for nested schema](#nestedatt--attributes))
- `enabled` (Boolean) The enabled state of the token. Default is `true`.
- `type` (String) The type of the token. Default is `public-api`.
- `enabled` (Boolean) True if the token is enabled. Default is `true`.
- `type` (String) The type of token. Default is `public-api`.

### Read-Only

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ resource "swo_dashboard" "metrics_dashboard" {
### Optional

- `category_id` (String) The category that this dashboard is assigned to.
- `is_private` (Boolean) Is this dashboard restricted to the owner?
- `is_private` (Boolean) True if the dashboard is restricted to the owner
- `widgets` (Attributes Set) The widgets that are placed on the dashboard. (see [below for nested schema](#nestedatt--widgets))

### Read-Only
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/logfilter.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ A terraform resource for managing log exclusion filters.
resource "swo_logfilter" "test" {
name = "terraform-provider-swo example"
description = "test log filter"
token_signature = null
token_signature = swo_apitoken.an_ingestion_token.id
expressions = [
{
kind = "STRING"
Expand All @@ -37,7 +37,7 @@ resource "swo_logfilter" "test" {
### Optional

- `description` (String) The description of the log exclusion filter.
- `token_signature` (String) The token signature of the log exclusion filter.
- `token_signature` (String) The ID of the ingestion token to scope the exclusion filter to. If not provided, the filter will be global. If provided, the filter will only apply to logs ingested by the specified token. (NOTE: There may be only one global filter.)

### Read-Only

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/notification.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ Required:

Optional:

- `auth_header_hame` (String) Header name for token auth.
- `auth_header_name` (String) Header name for token auth.
- `auth_header_value` (String, Sensitive) Header value for token auth.
- `auth_password` (String, Sensitive) Password for basic auth type.
- `auth_type` (String) Token or username/password auth. Valid values are [`basic`|`token`].
Expand Down
2 changes: 1 addition & 1 deletion examples/resources/swo_alert/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ resource "swo_alert" "https_response_time" {
exclude_tags = []
},
]
notifications = [swo_notification.msteams.id, swo_notification.opsgenie.id]
notifications = [swo_notification.msteams.id, swo_notification.opsgenie.id]
trigger_reset_actions = true
}
2 changes: 1 addition & 1 deletion internal/provider/notification_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func (r *notificationResource) Schema(ctx context.Context, req resource.SchemaRe
Optional: true,
Sensitive: true,
},
"auth_header_hame": schema.StringAttribute{
"auth_header_name": schema.StringAttribute{
Description: "Header name for token auth.",
Optional: true,
},
Expand Down

0 comments on commit 49ba117

Please sign in to comment.