Skip to content

Commit

Permalink
docs: Update connection filter example with better explanation on the…
Browse files Browse the repository at this point in the history
… syntax (#46)
  • Loading branch information
alexluong authored May 4, 2024
1 parent f09071d commit 78faa23
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/resources/connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,17 @@ resource "hookdeck_connection" "connection_example" {
{
filter_rule = {
body = {
# you can use a file for the filter JSON
json = file("${path.module}/filter_body.json")
}
headers = {
# or use Terraform's `jsonencode` to inline the JSON
json = jsonencode({
authorization = "my_super_secret_key"
})
}
path = {
# or match with a `string`, `number`, or `boolean` value
string = "/api/webhook"
}
}
Expand Down
8 changes: 8 additions & 0 deletions examples/resources/hookdeck_connection/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,17 @@ resource "hookdeck_connection" "connection_example" {
{
filter_rule = {
body = {
# you can use a file for the filter JSON
json = file("${path.module}/filter_body.json")
}
headers = {
# or use Terraform's `jsonencode` to inline the JSON
json = jsonencode({
authorization = "my_super_secret_key"
})
}
path = {
# or match with a `string`, `number`, or `boolean` value
string = "/api/webhook"
}
}
Expand Down

0 comments on commit 78faa23

Please sign in to comment.