Skip to content

Commit 8efbf92

Browse files
authored
Fix/rate limit period concurrent (#129)
* fix: add "concurrent" to rate_limit.period validation * chore: remove old API key * chore: Ignore the terraform provider locally built binary * chore: add hashicorp/setup-terraform@v3 dependency * chore: bump Hookdeck Go SDK to v0.7.0 * chore: correctly bump Hookdeck SDK * chore: generate * chore: add rate_limit.period = "concurrent" example * chore: lint fix
1 parent 6063197 commit 8efbf92

File tree

13 files changed

+196
-5
lines changed

13 files changed

+196
-5
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
generate:
3838
runs-on: ubuntu-latest
3939
steps:
40+
- uses: hashicorp/setup-terraform@v3
4041
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
4142
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
4243
with:

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,7 @@ website/vendor
3737

3838
/examples/dev
3939

40-
*.lock.hcl
40+
*.lock.hcl
41+
42+
# Ignore the terraform provider locally built binary
43+
terraform-provider-hookdeck

docs/data-sources/destination.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,5 +140,5 @@ Basic (default) or Bearer Authentication
140140
Read-Only:
141141

142142
- `limit` (Number) Limit event attempts to receive per period. Max value is workspace plan's max attempts thoughput.
143-
- `period` (String) must be one of ["second", "minute", "hour"]
143+
- `period` (String) must be one of ["second", "minute", "hour", "concurrent"]
144144
Period to rate limit attempts

docs/resources/destination.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ Basic (default) or Bearer Authentication
171171
Required:
172172

173173
- `limit` (Number) Limit event attempts to receive per period. Max value is workspace plan's max attempts thoughput.
174-
- `period` (String) must be one of ["second", "minute", "hour"]
174+
- `period` (String) must be one of ["second", "minute", "hour", "concurrent"]
175175
Period to rate limit attempts
176176

177177
## Import

docs/resources/source_verification.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Optional:
4242
- `aws_sns` (Attributes) (see [below for nested schema](#nestedatt--verification--aws_sns))
4343
- `basic_auth` (Attributes) (see [below for nested schema](#nestedatt--verification--basic_auth))
4444
- `bondsmith` (Attributes) (see [below for nested schema](#nestedatt--verification--bondsmith))
45+
- `bridge` (Attributes) (see [below for nested schema](#nestedatt--verification--bridge))
4546
- `cloudsignal` (Attributes) (see [below for nested schema](#nestedatt--verification--cloudsignal))
4647
- `commercelayer` (Attributes) (see [below for nested schema](#nestedatt--verification--commercelayer))
4748
- `courier` (Attributes) (see [below for nested schema](#nestedatt--verification--courier))
@@ -67,6 +68,7 @@ Optional:
6768
- `persona` (Attributes) (see [below for nested schema](#nestedatt--verification--persona))
6869
- `pipedrive` (Attributes) (see [below for nested schema](#nestedatt--verification--pipedrive))
6970
- `postmark` (Attributes) (see [below for nested schema](#nestedatt--verification--postmark))
71+
- `praxis` (Attributes) (see [below for nested schema](#nestedatt--verification--praxis))
7072
- `property_finder` (Attributes) (see [below for nested schema](#nestedatt--verification--property_finder))
7173
- `pylon` (Attributes) (see [below for nested schema](#nestedatt--verification--pylon))
7274
- `razorpay` (Attributes) (see [below for nested schema](#nestedatt--verification--razorpay))
@@ -86,6 +88,7 @@ Optional:
8688
- `telnyx` (Attributes) (see [below for nested schema](#nestedatt--verification--telnyx))
8789
- `three_d_eye` (Attributes) (see [below for nested schema](#nestedatt--verification--three_d_eye))
8890
- `tokenio` (Attributes) (see [below for nested schema](#nestedatt--verification--tokenio))
91+
- `treezor` (Attributes) (see [below for nested schema](#nestedatt--verification--treezor))
8992
- `trello` (Attributes) (see [below for nested schema](#nestedatt--verification--trello))
9093
- `twilio` (Attributes) (see [below for nested schema](#nestedatt--verification--twilio))
9194
- `twitch` (Attributes) (see [below for nested schema](#nestedatt--verification--twitch))
@@ -145,6 +148,14 @@ Required:
145148
- `webhook_secret_key` (String, Sensitive)
146149

147150

151+
<a id="nestedatt--verification--bridge"></a>
152+
### Nested Schema for `verification.bridge`
153+
154+
Required:
155+
156+
- `public_key` (String, Sensitive)
157+
158+
148159
<a id="nestedatt--verification--cloudsignal"></a>
149160
### Nested Schema for `verification.cloudsignal`
150161

@@ -346,6 +357,14 @@ Required:
346357
- `username` (String, Sensitive)
347358

348359

360+
<a id="nestedatt--verification--praxis"></a>
361+
### Nested Schema for `verification.praxis`
362+
363+
Required:
364+
365+
- `webhook_secret_key` (String, Sensitive)
366+
367+
349368
<a id="nestedatt--verification--property_finder"></a>
350369
### Nested Schema for `verification.property_finder`
351370

@@ -498,6 +517,14 @@ Required:
498517
- `public_key` (String, Sensitive)
499518

500519

520+
<a id="nestedatt--verification--treezor"></a>
521+
### Nested Schema for `verification.treezor`
522+
523+
Required:
524+
525+
- `webhook_secret_key` (String, Sensitive)
526+
527+
501528
<a id="nestedatt--verification--trello"></a>
502529
### Nested Schema for `verification.trello`
503530

examples/full/main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ resource "hookdeck_destination" "second_destination" {
6464
password = "blah-blah-blah"
6565
}
6666
}
67+
rate_limit = {
68+
period = "concurrent"
69+
limit = 10
70+
}
6771
}
6872

6973
resource "hookdeck_destination" "aws_destination" {

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
github.com/hashicorp/terraform-plugin-framework v1.11.0
1111
github.com/hashicorp/terraform-plugin-framework-validators v0.13.0
1212
github.com/hashicorp/terraform-plugin-log v0.9.0
13-
github.com/hookdeck/hookdeck-go-sdk v0.6.0
13+
github.com/hookdeck/hookdeck-go-sdk v0.7.0
1414
github.com/iancoleman/strcase v0.3.0
1515
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa
1616
golang.org/x/sys v0.24.0

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE
107107
github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ=
108108
github.com/hookdeck/hookdeck-go-sdk v0.6.0 h1:OEtw5cRV7ShDMfus8BjYKqi9wGHQ8/y4R5qEyUINZQQ=
109109
github.com/hookdeck/hookdeck-go-sdk v0.6.0/go.mod h1:fewtdP5f8hnU+x35l2s8F3SSiE94cGz+Q3bR4sI8zlk=
110+
github.com/hookdeck/hookdeck-go-sdk v0.7.0 h1:s+4gVXcoTwTcukdn6Fc2BydewmkK2QXyIZvAUQsIoVs=
111+
github.com/hookdeck/hookdeck-go-sdk v0.7.0/go.mod h1:fewtdP5f8hnU+x35l2s8F3SSiE94cGz+Q3bR4sI8zlk=
110112
github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4=
111113
github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
112114
github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI=

internal/provider/destination/schema.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,13 @@ func schemaAttributes() map[string]schema.Attribute {
110110
"second",
111111
"minute",
112112
"hour",
113+
"concurrent",
113114
),
114115
},
115116
PlanModifiers: []planmodifier.String{
116117
stringplanmodifier.UseStateForUnknown(),
117118
},
118-
MarkdownDescription: `must be one of ["second", "minute", "hour"]` + "\n" +
119+
MarkdownDescription: `must be one of ["second", "minute", "hour", "concurrent"]` + "\n" +
119120
`Period to rate limit attempts`,
120121
},
121122
},

internal/provider/sourceverification/generated/model.go

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)