Skip to content

Commit

Permalink
chore: add docs examples
Browse files Browse the repository at this point in the history
  • Loading branch information
eidam committed May 17, 2021
1 parent 99ea7fc commit f16eb98
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 30 deletions.
15 changes: 15 additions & 0 deletions docs/data-sources/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,22 @@ description: |-



## Example Usage

```terraform
data "statusflare_integration" "example" {
name = "example-integration-name"
}
resource "statusflare_monitor" "example" {
name = "Example monitor"
url = "www.example.com"
integrations = [
data.statusflare_integration.example.id
]
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ description: |-
terraform {
required_providers {
statusflare = {
version = "~> 1.0"
source = "statusflare.com/statusflare/statusflare"
version = "~> 0.1"
source = "statusflare-com/statusflare"
}
}
}
Expand Down
10 changes: 9 additions & 1 deletion docs/resources/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ description: |-




## Example Usage

```terraform
resource "statusflare_integration" "example" {
name = "example-integration-name"
type = "webhook"
secret = "https://webhook.example.com"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
11 changes: 11 additions & 0 deletions docs/resources/monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,18 @@ description: |-



## Example Usage

```terraform
resource "statusflare_monitor" "example" {
name = "Example monitor"
url = "www.example.com"
integrations = [
data.statusflare_integration.slack.id
]
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
12 changes: 12 additions & 0 deletions examples/data-sources/statusflare_integration/data-source.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
data "statusflare_integration" "example" {
name = "example-integration-name"
}

resource "statusflare_monitor" "example" {
name = "Example monitor"
url = "www.example.com"

integrations = [
data.statusflare_integration.example.id
]
}
23 changes: 0 additions & 23 deletions examples/main.tf

This file was deleted.

6 changes: 2 additions & 4 deletions examples/provider/provider.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
terraform {
required_providers {
statusflare = {
version = "~> 1.0"
source = "statusflare.com/statusflare/statusflare"
version = "~> 0.1"
source = "statusflare-com/statusflare"
}
}
}
Expand All @@ -12,5 +12,3 @@ provider "statusflare" {
key_id = "..."
token = "***"
}


5 changes: 5 additions & 0 deletions examples/resources/statusflare_integration/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resource "statusflare_integration" "example" {
name = "example-integration-name"
type = "webhook"
secret = "https://webhook.example.com"
}
8 changes: 8 additions & 0 deletions examples/resources/statusflare_monitor/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
resource "statusflare_monitor" "example" {
name = "Example monitor"
url = "www.example.com"

integrations = [
data.statusflare_integration.slack.id
]
}

0 comments on commit f16eb98

Please sign in to comment.