Skip to content

Commit 8047c7e

Browse files
authored
Merge pull request #23 from kreemer/owasp_functionality
Add owasp functionality
2 parents 24a39cb + 1b46fe8 commit 8047c7e

29 files changed

Lines changed: 1699 additions & 1 deletion

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
paths-ignore:
99
- 'README.md'
1010
push:
11+
branches:
12+
- main
1113
paths-ignore:
1214
- 'README.md'
1315

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,5 @@ website/vendor
3333

3434
# Keep windows files with windows line endings
3535
*.winfile eol=crlf
36+
37+
.env
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
page_title: "loadmaster_owasp_custom_data Data Source - loadmaster"
3+
subcategory: "OWASP"
4+
description: |-
5+
Use this data source to retrieve information about a owasp custom rule.
6+
---
7+
8+
# loadmaster_owasp_custom_data (Data Source)
9+
10+
Use this data source to retrieve information about a owasp custom rule.
11+
12+
## Example Usage
13+
14+
```terraform
15+
data "loadmaster_owasp_custom_data" "example" {
16+
filename = "file_name.txt"
17+
}
18+
```
19+
20+
<!-- schema generated by tfplugindocs -->
21+
## Schema
22+
23+
### Required
24+
25+
- `filename` (String) Identifier of the rule.
26+
27+
### Read-Only
28+
29+
- `data` (String) The data of the custom rule.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
page_title: "loadmaster_owasp_custom_rule Data Source - loadmaster"
3+
subcategory: "OWASP"
4+
description: |-
5+
Use this data source to retrieve information about a owasp custom rule.
6+
---
7+
8+
# loadmaster_owasp_custom_rule (Data Source)
9+
10+
Use this data source to retrieve information about a owasp custom rule.
11+
12+
## Example Usage
13+
14+
```terraform
15+
data "loadmaster_owasp_custom_rule" "example" {
16+
filename = "test_rule_replace"
17+
}
18+
```
19+
20+
<!-- schema generated by tfplugindocs -->
21+
## Schema
22+
23+
### Required
24+
25+
- `filename` (String) Identifier of the rule.
26+
27+
### Read-Only
28+
29+
- `data` (String) The data of the custom rule.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
page_title: "loadmaster_owasp_custom_data Resource - loadmaster"
3+
subcategory: "OWASP"
4+
description: |-
5+
Manages a OwaspCustomData.
6+
---
7+
8+
# loadmaster_owasp_custom_data (Resource)
9+
10+
Manages a `OwaspCustomData`.
11+
12+
## Example Usage
13+
14+
```terraform
15+
resource "loadmaster_owasp_custom_data" "name" {
16+
filename = "rule.txt"
17+
18+
data = <<-EOT
19+
Data
20+
EOT
21+
}
22+
```
23+
24+
<!-- schema generated by tfplugindocs -->
25+
## Schema
26+
27+
### Required
28+
29+
- `data` (String) The replacement string.
30+
- `filename` (String) Identifier of the data, should be unique for all different data.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
page_title: "loadmaster_owasp_custom_rule Resource - loadmaster"
3+
subcategory: "OWASP"
4+
description: |-
5+
Manages a OwaspCustomRule.
6+
---
7+
8+
# loadmaster_owasp_custom_rule (Resource)
9+
10+
Manages a `OwaspCustomRule`.
11+
12+
## Example Usage
13+
14+
```terraform
15+
resource "loadmaster_owasp_custom_rule" "name" {
16+
filename = "rule"
17+
18+
data = <<-EOT
19+
# OWASP Custom Rule
20+
SecRule REQUEST_HEADERS:User-Agent "BadBot" "id:12345,phase:1,deny,status:403,msg:'Bad Bot Detected'"
21+
EOT
22+
}
23+
```
24+
25+
<!-- schema generated by tfplugindocs -->
26+
## Schema
27+
28+
### Required
29+
30+
- `data` (String) The replacement string.
31+
- `filename` (String) Identifier of the rule, should be unique for all different rules.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
page_title: "loadmaster_virtual_service_owasp_rule Resource - loadmaster"
3+
subcategory: "OWASP"
4+
description: |-
5+
Manages connection between a VirtualService and an OwapsCustomRule.
6+
---
7+
8+
# loadmaster_virtual_service_owasp_rule (Resource)
9+
10+
Manages connection between a `VirtualService` and an `OwapsCustomRule`.
11+
12+
## Example Usage
13+
14+
```terraform
15+
resource "loadmaster_virtual_service_owasp_rule" "example" {
16+
virtual_service_id = loadmaster_virtual_service.example.id
17+
rule = <<-EOT
18+
[...]
19+
EOT
20+
run_first = false
21+
}
22+
```
23+
24+
<!-- schema generated by tfplugindocs -->
25+
## Schema
26+
27+
### Required
28+
29+
- `rule` (String) The replacement string.
30+
- `virtual_service_id` (String) Identifier of the virtual service.
31+
32+
### Optional
33+
34+
- `run_first` (Boolean) Whether the rule should be run first.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
data "loadmaster_owasp_custom_data" "example" {
2+
filename = "file_name.txt"
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
data "loadmaster_owasp_custom_rule" "example" {
2+
filename = "test_rule_replace"
3+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
resource "loadmaster_owasp_custom_data" "name" {
2+
filename = "rule.txt"
3+
4+
data = <<-EOT
5+
Data
6+
EOT
7+
}

0 commit comments

Comments
 (0)