Skip to content

Commit

Permalink
📝 update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaultleouay committed Oct 10, 2024
1 parent 7b9199c commit 33d3119
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 20 deletions.
59 changes: 56 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,68 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "openstatus Provider"
page_title: "OpenStatus Provider"
subcategory: ""
description: |-
---

# openstatus Provider
# OpenStatus Provider

The [OpenStatus](https://www.openstatus.dev) provider is used to interact with the resources supported by OpenStatus. The provider needs to be configured with the proper credentials before it can be used.


## Example Usage

```hcl
terraform {
required_providers {
openstatus = {
source = "openstatusHQ/openstatus"
}
}
}
provider "openstatus" {
openstatus_api_token = "your-key"
}
resource "openstatus_monitor" "my_monitor" {
url = "https://www.openstatus.dev"
regions = ["iad", "jnb", "ams"]
periodicity = "10m"
name = "test-monitor"
degraded_after = 30
timeout = 13
active = false
description = "This is a test monitor"
headers = [
{ key = "test-key", value = "test-value" },
]
assertions = [
{
type = "status"
target = "200"
key = ""
compare = "eq"
},
{
type = "status"
target = "300"
key = ""
compare = "eq"
},
{
type = "header"
target = "test"
key = "test"
compare = "eq"
}
]
}
```


<!-- schema generated by tfplugindocs -->
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "openstatus_monitor Resource - terraform-provider-openstatus"
subcategory: ""
description: |-
---

# openstatus_monitor (Resource)


<https://docs.openstatus.dev/synthetic/features/monitor>



Expand Down
3 changes: 1 addition & 2 deletions examples/main.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
terraform {
required_providers {
openstatus = {
source = "openstatus.dev/tf/openstatus"

source = "openstatusHQ/openstatus"
}
}
}
Expand Down
14 changes: 1 addition & 13 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
terraform {
required_providers {
openstatus = {
source = "openstatus.dev/tf/openstatus"
# version = "~> 0.0.2"

source = "openstatusHQ/openstatus"
}
}
}
Expand All @@ -12,16 +10,6 @@ provider "openstatus" {
openstatus_api_token = "your-key"
}

# resource "openstatus_monitor" "my_monitor" {
# url = "https://www.openstatus.dev"
# regions= ["iad", "jnb"]
# periodicity = "10m"
# name = "test-monitor"
# active = true
# description = "This is a test monitor"
# }



resource "openstatus_monitor" "my_monitor" {
url = "https://www.openstatus.dev"
Expand Down

0 comments on commit 33d3119

Please sign in to comment.