diff --git a/docs/resources/connection.md b/docs/resources/connection.md index 6393e53..1c633bf 100644 --- a/docs/resources/connection.md +++ b/docs/resources/connection.md @@ -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" } } diff --git a/examples/resources/hookdeck_connection/resource.tf b/examples/resources/hookdeck_connection/resource.tf index a85e8fd..7413c22 100644 --- a/examples/resources/hookdeck_connection/resource.tf +++ b/examples/resources/hookdeck_connection/resource.tf @@ -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" } }