Skip to content

Commit

Permalink
Merge pull request #14 from axiomhq/docs
Browse files Browse the repository at this point in the history
  • Loading branch information
toppercodes authored Apr 2, 2024
2 parents 5167791 + cd14d0b commit 9fd7069
Show file tree
Hide file tree
Showing 9 changed files with 456 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/data-sources/dataset.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "axiom_dataset Data Source - terraform-provider-axiom"
subcategory: ""
description: |-
---

# axiom_dataset (Data Source)





<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `id` (String) Dataset identifier

### Read-Only

- `description` (String) Dataset description
- `name` (String) Dataset name
33 changes: 33 additions & 0 deletions docs/data-sources/monitor.md
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: "axiom_monitor Data Source - terraform-provider-axiom"
subcategory: ""
description: |-
---

# axiom_monitor (Data Source)





<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `id` (String) Monitor identifier

### Read-Only

- `alert_on_no_data` (Boolean) If the monitor should trigger an alert if there is no data
- `apl_query` (String) The query used inside the monitor
- `description` (String) Monitor description
- `disabled_until` (String) The time the monitor will be disabled until
- `interval_minutes` (Number) How often the monitor should run
- `name` (String) Monitor name
- `notifier_ids` (List of String) A list of notifier id's to be used when this monitor triggers
- `operator` (String) Operator used in monitor trigger evaluation
- `range_minutes` (Number) Query time range from now
- `threshold` (Number) The threshold where the monitor should trigger
96 changes: 96 additions & 0 deletions docs/data-sources/notifier.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "axiom_notifier Data Source - terraform-provider-axiom"
subcategory: ""
description: |-
---

# axiom_notifier (Data Source)





<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `id` (String) Notifier identifier

### Read-Only

- `name` (String) Notifier name
- `properties` (Attributes) The properties of the notifier (see [below for nested schema](#nestedatt--properties))

<a id="nestedatt--properties"></a>
### Nested Schema for `properties`

Read-Only:

- `discord` (Attributes) (see [below for nested schema](#nestedatt--properties--discord))
- `discord_webhook` (Attributes) (see [below for nested schema](#nestedatt--properties--discord_webhook))
- `email` (Attributes) (see [below for nested schema](#nestedatt--properties--email))
- `opsgenie` (Attributes) (see [below for nested schema](#nestedatt--properties--opsgenie))
- `pagerduty` (Attributes) (see [below for nested schema](#nestedatt--properties--pagerduty))
- `slack` (Attributes) (see [below for nested schema](#nestedatt--properties--slack))
- `webhook` (Attributes) (see [below for nested schema](#nestedatt--properties--webhook))

<a id="nestedatt--properties--discord"></a>
### Nested Schema for `properties.discord`

Read-Only:

- `discord_channel` (String) The discord channel
- `discord_token` (String) The discord token


<a id="nestedatt--properties--discord_webhook"></a>
### Nested Schema for `properties.discord_webhook`

Read-Only:

- `discord_webhook_url` (String) The discord webhook URL


<a id="nestedatt--properties--email"></a>
### Nested Schema for `properties.email`

Read-Only:

- `emails` (List of String) The emails to be notified


<a id="nestedatt--properties--opsgenie"></a>
### Nested Schema for `properties.opsgenie`

Read-Only:

- `api_key` (String) The opsgenie API key
- `is_eu` (Boolean) The opsgenie is EU


<a id="nestedatt--properties--pagerduty"></a>
### Nested Schema for `properties.pagerduty`

Read-Only:

- `routing_key` (String) The pagerduty routing key
- `token` (String) The pager duty token


<a id="nestedatt--properties--slack"></a>
### Nested Schema for `properties.slack`

Read-Only:

- `slack_url` (String) The slack URL


<a id="nestedatt--properties--webhook"></a>
### Nested Schema for `properties.webhook`

Read-Only:

- `url` (String) The webhook URL
26 changes: 26 additions & 0 deletions docs/data-sources/user.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "axiom_user Data Source - terraform-provider-axiom"
subcategory: ""
description: |-
---

# axiom_user (Data Source)





<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `id` (String) Users identifier

### Read-Only

- `email` (String) Users email
- `name` (String) Users name
- `role` (String) Users role
90 changes: 90 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "axiom Provider"
subcategory: ""
description: |-
---

# axiom Provider





<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `api_token` (String) The Axiom API token.
- `org_id` (String) The Axiom organization ID.

### Optional

- `base_url` (String) The base url of the axiom api.

# Example
```terraform
terraform {
required_providers {
axiom = {
source = "axiomhq/axiom"
version = "1.0"
}
}
}
provider "axiom" {
api_token = ""
org_id = ""
base_url = "https://api.axiom.co"
}
// create a dataset resource with name and description
resource "axiom_dataset" "testing_dataset" {
name = "created_via_terraform"
description = "testing datasets using tf"
}
resource "axiom_notifier" "slack_test" {
name = "slack_test"
properties = {
slack = {
slack_url = "https://hooks.slack.com/services/EXAMPLE/EXAMPLE/EXAMPLE"
}
# discord = {
# discord_channel = "https://discord.com/api/webhooks/EXAMPLE/EXAMPLE/EXAMPLE"
# discord_token = "EXAMPLE"
# }
# email= {
# emails = ["test","test2"]
# }
}
}
resource "axiom_monitor" "test_monitor" {
depends_on = [axiom_dataset.testing_dataset, axiom_notifier.slack_test]
name = "test monitor"
description = "test_monitor updated"
apl_query = <<EOT
['created_via_terraform']
| summarize count() by bin_auto(_time)
EOT
interval_minutes = 5
operator = "Above"
range_minutes = 5
threshold = 1
notifier_ids = [
axiom_notifier.slack_test.id
]
alert_on_no_data = false
notify_by_group = false
}
resource "axiom_user" "test_user" {
name = "axiom user"
email = "[email protected]"
role = "user"
}
```
28 changes: 28 additions & 0 deletions docs/resources/dataset.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "axiom_dataset Resource - terraform-provider-axiom"
subcategory: ""
description: |-
---

# axiom_dataset (Resource)





<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `name` (String) Dataset name

### Optional

- `description` (String) Dataset description

### Read-Only

- `id` (String) Dataset identifier
36 changes: 36 additions & 0 deletions docs/resources/monitor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "axiom_monitor Resource - terraform-provider-axiom"
subcategory: ""
description: |-
---

# axiom_monitor (Resource)





<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `alert_on_no_data` (Boolean) If the monitor should trigger an alert if there is no data
- `apl_query` (String) The query used inside the monitor
- `interval_minutes` (Number) How often the monitor should run
- `name` (String) Monitor name
- `operator` (String) Operator used in monitor trigger evaluation
- `range_minutes` (Number) Query time range from now
- `threshold` (Number) The threshold where the monitor should trigger

### Optional

- `description` (String) Monitor description
- `disabled_until` (String) The time the monitor will be disabled until
- `notifier_ids` (List of String) A list of notifier id's to be used when this monitor triggers

### Read-Only

- `id` (String) Monitor identifier
Loading

0 comments on commit 9fd7069

Please sign in to comment.