Skip to content

Commit 220b25a

Browse files
authored
fix: update examples to use types (#148)
1 parent a0a6fa4 commit 220b25a

File tree

4 files changed

+40
-40
lines changed

4 files changed

+40
-40
lines changed

docs/resources/destination.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,18 @@ Destination Resource
1414

1515
```terraform
1616
resource "hookdeck_destination" "example" {
17-
name = "example"
18-
description = "example destination"
19-
url = "https://mock.hookdeck.com"
20-
http_method = "POST"
21-
rate_limit = {
22-
limit = 10
23-
period = "second"
24-
}
25-
auth_method = {
26-
api_key = {
27-
api_key = var.destination_api_key
28-
key = "x-webhook-key"
17+
name = "example"
18+
type = "HTTP"
19+
config = jsonencode({
20+
url = "https://example.test/webhook"
21+
auth_type = "BASIC_AUTH"
22+
auth = {
23+
username = "username"
24+
password = "password"
2925
}
30-
}
26+
rate_limit = 10
27+
rate_limit_period = "concurrent"
28+
})
3129
}
3230
```
3331

docs/resources/source.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ Source Resource
1414

1515
```terraform
1616
resource "hookdeck_source" "example" {
17-
name = "example"
18-
description = "example source"
19-
allowed_http_methods = ["GET", "POST", "PUT"]
20-
custom_response = {
21-
content_type = "json"
22-
body = "{\"hello\": \"world\"}"
23-
}
17+
name = "example"
18+
type = "HTTP"
19+
config = jsonencode({
20+
allowed_http_methods = ["GET", "POST", "PUT"]
21+
custom_response = {
22+
content_type = "json"
23+
body = "{\"hello\": \"world\"}"
24+
}
25+
})
2426
}
2527
```
2628

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
resource "hookdeck_destination" "example" {
2-
name = "example"
3-
description = "example destination"
4-
url = "https://mock.hookdeck.com"
5-
http_method = "POST"
6-
rate_limit = {
7-
limit = 10
8-
period = "second"
9-
}
10-
auth_method = {
11-
api_key = {
12-
api_key = var.destination_api_key
13-
key = "x-webhook-key"
2+
name = "example"
3+
type = "HTTP"
4+
config = jsonencode({
5+
url = "https://example.test/webhook"
6+
auth_type = "BASIC_AUTH"
7+
auth = {
8+
username = "username"
9+
password = "password"
1410
}
15-
}
11+
rate_limit = 10
12+
rate_limit_period = "concurrent"
13+
})
1614
}
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
resource "hookdeck_source" "example" {
2-
name = "example"
3-
description = "example source"
4-
allowed_http_methods = ["GET", "POST", "PUT"]
5-
custom_response = {
6-
content_type = "json"
7-
body = "{\"hello\": \"world\"}"
8-
}
2+
name = "example"
3+
type = "HTTP"
4+
config = jsonencode({
5+
allowed_http_methods = ["GET", "POST", "PUT"]
6+
custom_response = {
7+
content_type = "json"
8+
body = "{\"hello\": \"world\"}"
9+
}
10+
})
911
}

0 commit comments

Comments
 (0)