Skip to content

Commit 9b3822c

Browse files
authored
Merge pull request #37 from CheckPointSW/rate-limit-practice
2 parents 4e97004 + 275be7c commit 9b3822c

File tree

45 files changed

+1255
-118
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1255
-118
lines changed

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ terraform {
1717
required_providers {
1818
inext = {
1919
source = "CheckPointSW/infinity-next"
20-
version = "1.1.7"
20+
version = "1.2.0"
2121
}
2222
}
2323
}

docs/resources/inext_appsec_gateway_profile.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ terraform {
1717
required_providers {
1818
inext = {
1919
source = "CheckPointSW/infinity-next"
20-
version = "1.1.7"
20+
version = "1.2.0"
2121
}
2222
}
2323
}

docs/resources/inext_docker_profile.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ terraform {
1717
required_providers {
1818
inext = {
1919
source = "CheckPointSW/infinity-next"
20-
version = "~>1.1.7"
20+
version = "~>1.2.0"
2121
}
2222
}
2323
}

docs/resources/inext_embedded_profile.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ terraform {
1717
required_providers {
1818
inext = {
1919
source = "CheckPointSW/infinity-next"
20-
version = "~>1.1.7"
20+
version = "~>1.2.0"
2121
}
2222
}
2323
}

docs/resources/inext_exceptions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ terraform {
1717
required_providers {
1818
inext = {
1919
source = "CheckPointSW/infinity-next"
20-
version = "~>1.1.7"
20+
version = "~>1.2.0"
2121
}
2222
}
2323
}

docs/resources/inext_kubernetes_profile.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ terraform {
1717
required_providers {
1818
inext = {
1919
source = "CheckPointSW/infinity-next"
20-
version = "~>1.1.7"
20+
version = "~>1.2.0"
2121
}
2222
}
2323
}

docs/resources/inext_log_trigger.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ terraform {
1717
required_providers {
1818
inext = {
1919
source = "CheckPointSW/infinity-next"
20-
version = "~>1.1.7"
20+
version = "~>1.2.0"
2121
}
2222
}
2323
}
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "inext_rate_limit_practice Resource - terraform-provider-infinity-next"
4+
subcategory: ""
5+
description: |-
6+
Rate limit Practice
7+
---
8+
9+
# inext_rate_limit_practice (Resource)
10+
11+
Rate limit Practice
12+
13+
## Example Usage
14+
15+
```terraform
16+
terraform {
17+
required_providers {
18+
inext = {
19+
source = "CheckPointSW/infinity-next"
20+
version = "~>1.2.0"
21+
}
22+
}
23+
}
24+
25+
provider "inext" {
26+
region = "eu"
27+
# client_id = "" // can be set with env var INEXT_CLIENT_ID
28+
# access_key = "" // can be set with env var INEXT_ACCESS_KEY
29+
}
30+
31+
resource "inext_rate_limit_practice" "my_rate_limit_practice" {
32+
name = "my rate limit practice"
33+
visibility = "Shared" # Optional: "Shared" (default) or "Local"
34+
35+
# Multiple rate limit rules
36+
rule {
37+
uri = "/api/v1/users"
38+
scope = "Minute" # Required: "Minute" or "Second"
39+
limit = 100 # Required: number of requests allowed
40+
action = "Detect" # Optional: "Detect", "Prevent", or "AccordingToPractice" (default)
41+
comment = "User API rate limit" # Optional: description of the rule
42+
}
43+
44+
rule {
45+
uri = "/api/v1/login"
46+
scope = "Second"
47+
limit = 5
48+
action = "Prevent"
49+
comment = "Login endpoint strict rate limit"
50+
}
51+
52+
rule {
53+
uri = "/api/v1/search"
54+
scope = "Minute"
55+
limit = 200
56+
action = "AccordingToPractice"
57+
comment = "Search API with higher limit"
58+
}
59+
}
60+
61+
# Example with minimal configuration (only required fields)
62+
resource "inext_rate_limit_practice" "minimal_example" {
63+
name = "minimal rate limit practice"
64+
65+
rule {
66+
uri = "/api/minimal"
67+
scope = "Minute"
68+
limit = 50
69+
}
70+
}
71+
```
72+
73+
<!-- schema generated by tfplugindocs -->
74+
## Schema
75+
76+
### Required
77+
78+
- `name` (String) The name of the resource, also acts as its unique ID
79+
80+
### Optional
81+
82+
- `rule` (Block Set) Rate limit rules (see [below for nested schema](#nestedblock--rule))
83+
- `visibility` (String) The visibility of the resource, Shared or Local
84+
85+
### Read-Only
86+
87+
- `category` (String)
88+
- `default` (Boolean)
89+
- `id` (String) The ID of this resource.
90+
- `practice_type` (String)
91+
92+
<a id="nestedblock--rule"></a>
93+
### Nested Schema for `rule`
94+
95+
Required:
96+
97+
- `limit` (Number) The actual number of requests to enable
98+
- `scope` (String) The time unit during which the rate limit is enfrorced. Must be one of: Minute, Second
99+
- `uri` (String)
100+
101+
Optional:
102+
103+
- `action` (String) The action to perform upon a request which crosses the rate limit. Must be one of: Detect, Prevent, AccordingToPractice (case sensitive!!). Defaults to AccordingToPractice
104+
- `comment` (String) A general comment which describes the rate limit rule
105+
106+
Read-Only:
107+
108+
- `id` (String) The ID of this resource.
109+
110+

docs/resources/inext_trusted_sources.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ terraform {
1717
required_providers {
1818
inext = {
1919
source = "CheckPointSW/infinity-next"
20-
version = "1.1.7"
20+
version = "1.2.0"
2121
}
2222
}
2323
}

docs/resources/inext_web_api_asset.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ terraform {
1717
required_providers {
1818
inext = {
1919
source = "CheckPointSW/infinity-next"
20-
version = "1.1.7"
20+
version = "1.2.0"
2121
}
2222
}
2323
}
@@ -37,9 +37,10 @@ resource "inext_web_api_asset" "my-webapi-asset" {
3737
practice {
3838
main_mode = "Learn" # enum of ["Prevent", "Inactive", "Disabled", "Learn"]
3939
sub_practices_modes = {
40-
IPS = "AccordingToPractice" # enum of ["Detect", "Prevent", "Inactive", "AccordingToPractice", "Disabled", "Learn", "Active"]
41-
WebBot = "AccordingToPractice" # enum of ["Detect", "Prevent", "Inactive", "AccordingToPractice", "Disabled", "Learn", "Active"]
42-
Snort = "Disabled" # enum of ["Detect", "Prevent", "Inactive", "AccordingToPractice", "Disabled", "Learn", "Active"]
40+
IPS = "AccordingToPractice" # enum of ["Detect", "Prevent", "Inactive", "AccordingToPractice", "Disabled", "Learn", "Active"]
41+
WebBot = "AccordingToPractice" # enum of ["Detect", "Prevent", "Inactive", "AccordingToPractice", "Disabled", "Learn", "Active"]
42+
Snort = "Disabled" # enum of ["Detect", "Prevent", "Inactive", "AccordingToPractice", "Disabled", "Learn", "Active"]
43+
APIDiscovery = "Active" # enum of ["Active", "Disabled"]
4344
}
4445
id = inext_web_api_practice.my-webapi-practice.id # required
4546
triggers = [inext_log_trigger.mytrigger.id]

0 commit comments

Comments
 (0)