File tree Expand file tree Collapse file tree 3 files changed +62
-0
lines changed Expand file tree Collapse file tree 3 files changed +62
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ terraform init
4+ terraform plan
Original file line number Diff line number Diff line change 1+ variable "HOOKDECK_API_KEY" {
2+ type = string
3+ }
4+
5+ variable "HEADER_FILTER_VALUES" {
6+ type = list (string )
7+ }
8+
9+ terraform {
10+ required_providers {
11+ hookdeck = {
12+ source = " hookdeck/hookdeck"
13+ version = " ~> 0.3.1"
14+ }
15+ }
16+ }
17+
18+ provider "hookdeck" {
19+ api_key = var. HOOKDECK_API_KEY
20+ }
21+
22+ resource "hookdeck_source" "my_source" {
23+ name = " my_source"
24+ }
25+
26+ resource "hookdeck_destination" "my_destination" {
27+ name = " my_destination"
28+ url = " https://mock.hookdeck.com"
29+ }
30+
31+ resource "hookdeck_connection" "my_connection" {
32+ source_id = hookdeck_source. my_source . id
33+ destination_id = hookdeck_destination. my_destination . id
34+ rules = [
35+ {
36+ filter_rule = {
37+ headers = {
38+ json = jsonencode ({
39+ x-event-type = { " $or" : var.HEADER_FILTER_VALUES }
40+ })
41+ }
42+ }
43+ }
44+ ]
45+ }
Original file line number Diff line number Diff line change 1+ HOOKDECK_API_KEY = " <YOUR_HOOKDECK_API_KEY>"
2+
3+ HEADER_FILTER_VALUES = [
4+ " account.created.v1" ,
5+ " transaction.cancelled.v1" ,
6+ " transaction.pending.v1" ,
7+ " transaction.processed.v1" ,
8+ " account.updated.v2" ,
9+ " account.deposit_started.v1" ,
10+ " account.deposit_updated.v1" ,
11+ " account.funds_invested.v1" ,
12+ " account.funds_redeemed.v1" ,
13+ ]
You can’t perform that action at this time.
0 commit comments