Skip to content

Commit

Permalink
Merge pull request #156 from StatusCakeDev/update-examples
Browse files Browse the repository at this point in the history
Update examples
  • Loading branch information
tomasbasham authored Oct 20, 2023
2 parents 449b41f + 323ebfe commit 702f508
Show file tree
Hide file tree
Showing 16 changed files with 81 additions and 56 deletions.
6 changes: 3 additions & 3 deletions docs/resources/contact_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ output "operations_team_contact_group_id" {

## Import

Contact groups can be imported using the contact group `id`, e.g.
Import is supported using the following syntax:

```
$ terraform import statuscake_contact_group.operations_team 1234
```shell
terraform import statuscake_contact_group.operations_team 1234
```
29 changes: 26 additions & 3 deletions docs/resources/heartbeat_check.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,30 @@ description: |-



## Example Usage

```terraform
resource "statuscake_uptime_check" "example" {
name = "Example"
period = 1800
contact_groups = [
statuscake_contact_group.operations_team.id
]
tags = [
"production",
]
}
output "example_heartbeat_check_id" {
value = statuscake_heartbeat_check.example.id
}
output "example_heartbeat_check_url" {
value = statuscake_heartbeat_check.example.check_url
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down Expand Up @@ -41,8 +64,8 @@ Optional:

## Import

Heartbeat checks can be imported using the check `id`, e.g.
Import is supported using the following syntax:

```
$ terraform import statuscake_heartbeat_check.example_com 1234
```shell
terraform import statuscake_heartbeat_check.example_com 1234
```
13 changes: 6 additions & 7 deletions docs/resources/maintenance_window.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ description: |-

```terraform
resource "statuscake_maintenance_window" "weekends" {
name = "Weekends"
timezone = "UTC"
start = "2022-01-29T00:00:00Z"
end = "2022-01-30T23:59:59Z"
name = "Weekends"
repeat_interval = "1w"
start = "2022-01-29T00:00:00Z"
timezone = "UTC"
tags = [
"production"
Expand Down Expand Up @@ -53,8 +52,8 @@ resource "statuscake_maintenance_window" "weekends" {

## Import

Maintenance windows can be imported using the maintenance window `id`, e.g.
Import is supported using the following syntax:

```
$ terraform import statuscake_maintenance_window.weekends 1234
```shell
terraform import statuscake_maintenance_window.weekends 1234
```
16 changes: 8 additions & 8 deletions docs/resources/pagespeed_check.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ description: |-

```terraform
resource "statuscake_pagespeed_check" "example_com" {
name = "Example"
check_interval = 300
name = "Example"
region = "UK"
contact_groups = [
statuscake_contact_group.operations_team.id
]
alert_config {
alert_bigger = "5000"
}
contact_groups = [
statuscake_contact_group.operations_team.id
]
monitored_resource {
address = "https://www.example.com"
}
Expand Down Expand Up @@ -76,8 +76,8 @@ Required:

## Import

Pagespeed checks can be imported using the check `id`, e.g.
Import is supported using the following syntax:

```
$ terraform import statuscake_pagespeed_check.example_com 1234
```shell
terraform import statuscake_pagespeed_check.example_com 1234
```
21 changes: 10 additions & 11 deletions docs/resources/ssl_check.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,18 @@ resource "statuscake_ssl_check" "example_com" {
check_interval = 600
user_agent = "terraform managed SSL check"
contact_groups = [
statuscake_contact_group.operations_team.id
]
alert_config {
alert_at = [7, 14, 21]
on_reminder = true
on_expiry = true
alert_at = [7, 14, 21]
on_broken = false
on_expiry = true
on_mixed = false
on_reminder = true
}
contact_groups = [
statuscake_contact_group.operations_team.id
]
monitored_resource {
address = "https://www.example.com"
}
Expand Down Expand Up @@ -88,8 +87,8 @@ Optional:

## Import

SSL checks can be imported using the check `id`, e.g.
Import is supported using the following syntax:

```
$ terraform import statuscake_ssl_check.example_com 1234
```shell
terraform import statuscake_ssl_check.example_com 1234
```
10 changes: 5 additions & 5 deletions docs/resources/uptime_check.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ description: |-

```terraform
resource "statuscake_uptime_check" "example_com" {
name = "Example"
check_interval = 30
confirmation = 3
name = "Example"
trigger_rate = 10
contact_groups = [
Expand All @@ -31,8 +31,8 @@ resource "statuscake_uptime_check" "example_com" {
validate_ssl = true
basic_authentication {
username = "username"
password = "password"
username = "username"
}
content_matchers {
Expand Down Expand Up @@ -213,8 +213,8 @@ Read-Only:

## Import

Uptime checks can be imported using the check `id`, e.g.
Import is supported using the following syntax:

```
$ terraform import statuscake_uptime_check.example_com 1234
```shell
terraform import statuscake_uptime_check.example_com 1234
```
1 change: 1 addition & 0 deletions examples/resources/statuscake_contact_group/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import statuscake_contact_group.operations_team 1234
1 change: 1 addition & 0 deletions examples/resources/statuscake_heartbeat_check/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import statuscake_heartbeat_check.example_com 1234
1 change: 1 addition & 0 deletions examples/resources/statuscake_maintenance_window/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import statuscake_maintenance_window.weekends 1234
7 changes: 3 additions & 4 deletions examples/resources/statuscake_maintenance_window/resource.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
resource "statuscake_maintenance_window" "weekends" {
name = "Weekends"
timezone = "UTC"

start = "2022-01-29T00:00:00Z"
end = "2022-01-30T23:59:59Z"
name = "Weekends"
repeat_interval = "1w"
start = "2022-01-29T00:00:00Z"
timezone = "UTC"

tags = [
"production"
Expand Down
1 change: 1 addition & 0 deletions examples/resources/statuscake_pagespeed_check/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import statuscake_pagespeed_check.example_com 1234
10 changes: 5 additions & 5 deletions examples/resources/statuscake_pagespeed_check/resource.tf
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
resource "statuscake_pagespeed_check" "example_com" {
name = "Example"
check_interval = 300
name = "Example"
region = "UK"

contact_groups = [
statuscake_contact_group.operations_team.id
]

alert_config {
alert_bigger = "5000"
}

contact_groups = [
statuscake_contact_group.operations_team.id
]

monitored_resource {
address = "https://www.example.com"
}
Expand Down
1 change: 1 addition & 0 deletions examples/resources/statuscake_ssl_check/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import statuscake_ssl_check.example_com 1234
15 changes: 7 additions & 8 deletions examples/resources/statuscake_ssl_check/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@ resource "statuscake_ssl_check" "example_com" {
check_interval = 600
user_agent = "terraform managed SSL check"

contact_groups = [
statuscake_contact_group.operations_team.id
]

alert_config {
alert_at = [7, 14, 21]

on_reminder = true
on_expiry = true
alert_at = [7, 14, 21]
on_broken = false
on_expiry = true
on_mixed = false
on_reminder = true
}

contact_groups = [
statuscake_contact_group.operations_team.id
]

monitored_resource {
address = "https://www.example.com"
}
Expand Down
1 change: 1 addition & 0 deletions examples/resources/statuscake_uptime_check/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import statuscake_uptime_check.example_com 1234
4 changes: 2 additions & 2 deletions examples/resources/statuscake_uptime_check/resource.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
resource "statuscake_uptime_check" "example_com" {
name = "Example"
check_interval = 30
confirmation = 3
name = "Example"
trigger_rate = 10

contact_groups = [
Expand All @@ -16,8 +16,8 @@ resource "statuscake_uptime_check" "example_com" {
validate_ssl = true

basic_authentication {
username = "username"
password = "password"
username = "username"
}

content_matchers {
Expand Down

0 comments on commit 702f508

Please sign in to comment.