Skip to content

Commit 275be7c

Browse files
committed
go generate docs and examples
1 parent 2fa7a3b commit 275be7c

File tree

6 files changed

+35
-35
lines changed

6 files changed

+35
-35
lines changed

docs/resources/inext_rate_limit_practice.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,25 @@ provider "inext" {
3030
3131
resource "inext_rate_limit_practice" "my_rate_limit_practice" {
3232
name = "my rate limit practice"
33-
visibility = "Shared" # Optional: "Shared" (default) or "Local"
34-
33+
visibility = "Shared" # Optional: "Shared" (default) or "Local"
34+
3535
# Multiple rate limit rules
3636
rule {
3737
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
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
4242
}
43-
43+
4444
rule {
4545
uri = "/api/v1/login"
4646
scope = "Second"
4747
limit = 5
4848
action = "Prevent"
4949
comment = "Login endpoint strict rate limit"
5050
}
51-
51+
5252
rule {
5353
uri = "/api/v1/search"
5454
scope = "Minute"
@@ -61,7 +61,7 @@ resource "inext_rate_limit_practice" "my_rate_limit_practice" {
6161
# Example with minimal configuration (only required fields)
6262
resource "inext_rate_limit_practice" "minimal_example" {
6363
name = "minimal rate limit practice"
64-
64+
6565
rule {
6666
uri = "/api/minimal"
6767
scope = "Minute"

docs/resources/inext_web_api_asset.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +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"]
43-
APIDiscovery = "Active" # enum of ["Active", "Disabled"]
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"]
4444
}
4545
id = inext_web_api_practice.my-webapi-practice.id # required
4646
triggers = [inext_log_trigger.mytrigger.id]

examples/provider/rate-limit-practice.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
resource "inext_rate_limit_practice" "my_rate_limit_practice" {
22
name = "my rate limit practice"
3-
visibility = "Shared" # Optional: "Shared" (default) or "Local"
3+
visibility = "Shared" # Optional: "Shared" (default) or "Local"
44

55
# Multiple rate limit rules
66
rule {
77
uri = "/api/v1/users"
8-
scope = "Minute" # Required: "Minute" or "Second"
9-
limit = 100 # Required: number of requests allowed
10-
action = "Detect" # Optional: "Detect", "Prevent", or "AccordingToPractice" (default)
11-
comment = "User API rate limit" # Optional: description of the rule
8+
scope = "Minute" # Required: "Minute" or "Second"
9+
limit = 100 # Required: number of requests allowed
10+
action = "Detect" # Optional: "Detect", "Prevent", or "AccordingToPractice" (default)
11+
comment = "User API rate limit" # Optional: description of the rule
1212
}
1313

1414
rule {

examples/provider/web-api-asset.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ resource "inext_web_api_asset" "test" {
77
practice {
88
main_mode = "Prevent" # enum of ["Prevent", "Inactive", "Disabled", "Learn"]
99
sub_practices_modes = {
10-
IPS = "AccordingToPractice" # enum of ["Detect", "Prevent", "Inactive", "AccordingToPractice", "Disabled", "Learn", "Active"]
11-
WebBot = "AccordingToPractice" # enum of ["Detect", "Prevent", "Inactive", "AccordingToPractice", "Disabled", "Learn", "Active"]
12-
Snort = "Disabled" # enum of ["Detect", "Prevent", "Inactive", "AccordingToPractice", "Disabled", "Learn", "Active"]
13-
APIDiscovery = "Active" # enum of ["Active", "Disabled"]
10+
IPS = "AccordingToPractice" # enum of ["Detect", "Prevent", "Inactive", "AccordingToPractice", "Disabled", "Learn", "Active"]
11+
WebBot = "AccordingToPractice" # enum of ["Detect", "Prevent", "Inactive", "AccordingToPractice", "Disabled", "Learn", "Active"]
12+
Snort = "Disabled" # enum of ["Detect", "Prevent", "Inactive", "AccordingToPractice", "Disabled", "Learn", "Active"]
13+
APIDiscovery = "Active" # enum of ["Active", "Disabled"]
1414
}
1515
id = inext_web_api_practice.test.id # required
1616
triggers = [inext_log_trigger.test.id]

examples/resources/inext_rate_limit_practice/resource.tf

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,25 @@ provider "inext" {
1515

1616
resource "inext_rate_limit_practice" "my_rate_limit_practice" {
1717
name = "my rate limit practice"
18-
visibility = "Shared" # Optional: "Shared" (default) or "Local"
19-
18+
visibility = "Shared" # Optional: "Shared" (default) or "Local"
19+
2020
# Multiple rate limit rules
2121
rule {
2222
uri = "/api/v1/users"
23-
scope = "Minute" # Required: "Minute" or "Second"
24-
limit = 100 # Required: number of requests allowed
25-
action = "Detect" # Optional: "Detect", "Prevent", or "AccordingToPractice" (default)
26-
comment = "User API rate limit" # Optional: description of the rule
23+
scope = "Minute" # Required: "Minute" or "Second"
24+
limit = 100 # Required: number of requests allowed
25+
action = "Detect" # Optional: "Detect", "Prevent", or "AccordingToPractice" (default)
26+
comment = "User API rate limit" # Optional: description of the rule
2727
}
28-
28+
2929
rule {
3030
uri = "/api/v1/login"
3131
scope = "Second"
3232
limit = 5
3333
action = "Prevent"
3434
comment = "Login endpoint strict rate limit"
3535
}
36-
36+
3737
rule {
3838
uri = "/api/v1/search"
3939
scope = "Minute"
@@ -46,7 +46,7 @@ resource "inext_rate_limit_practice" "my_rate_limit_practice" {
4646
# Example with minimal configuration (only required fields)
4747
resource "inext_rate_limit_practice" "minimal_example" {
4848
name = "minimal rate limit practice"
49-
49+
5050
rule {
5151
uri = "/api/minimal"
5252
scope = "Minute"

examples/resources/inext_web_api_asset/resource.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ resource "inext_web_api_asset" "my-webapi-asset" {
2222
practice {
2323
main_mode = "Learn" # enum of ["Prevent", "Inactive", "Disabled", "Learn"]
2424
sub_practices_modes = {
25-
IPS = "AccordingToPractice" # enum of ["Detect", "Prevent", "Inactive", "AccordingToPractice", "Disabled", "Learn", "Active"]
26-
WebBot = "AccordingToPractice" # enum of ["Detect", "Prevent", "Inactive", "AccordingToPractice", "Disabled", "Learn", "Active"]
27-
Snort = "Disabled" # enum of ["Detect", "Prevent", "Inactive", "AccordingToPractice", "Disabled", "Learn", "Active"]
28-
APIDiscovery = "Active" # enum of ["Active", "Disabled"]
25+
IPS = "AccordingToPractice" # enum of ["Detect", "Prevent", "Inactive", "AccordingToPractice", "Disabled", "Learn", "Active"]
26+
WebBot = "AccordingToPractice" # enum of ["Detect", "Prevent", "Inactive", "AccordingToPractice", "Disabled", "Learn", "Active"]
27+
Snort = "Disabled" # enum of ["Detect", "Prevent", "Inactive", "AccordingToPractice", "Disabled", "Learn", "Active"]
28+
APIDiscovery = "Active" # enum of ["Active", "Disabled"]
2929
}
3030
id = inext_web_api_practice.my-webapi-practice.id # required
3131
triggers = [inext_log_trigger.mytrigger.id]

0 commit comments

Comments
 (0)