Skip to content

Commit

Permalink
BUG/MINOR: main: update with valid examples (#177)
Browse files Browse the repository at this point in the history
* BUG/MINOR: main: update with valid examples

Some of the examples in main.tf were not valid. (e.g. using
requestLogging in signal exclusion). This commit updates the examples
to be valid, which should prevent some of the unnecessary diffs from
continuing to show up when changes have not been made.

* linter
  • Loading branch information
daniel-corbett authored May 23, 2023
1 parent 1602b7d commit bd38d33
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ resource "sigsci_corp_rule" "test" {
value = "1.2.3.5"
}
actions {
type = "excludeSignal"
signal = sigsci_corp_signal_tag.test.id
type = "excludeSignal"
}
}

Expand Down Expand Up @@ -160,7 +159,6 @@ resource "sigsci_site_rule" "test" {
reason = "Example site rule update"
signal = "SQLI"
expiration = ""
requestlogging = "sampled"

conditions {
type = "single"
Expand All @@ -173,12 +171,25 @@ resource "sigsci_site_rule" "test" {
field = "ip"
operator = "equals"
value = "1.2.3.5"
}
conditions {
type = "multival"
field = "queryParameter"
operator = "exists"
group_operator = "all"

conditions {
type = "multival"
field = "ip"
operator = "equals"
group_operator = "all"
value = "1.2.3.8"
type = "single"
field = "name"
operator = "equals"
value = "hello"
}

conditions {
type = "single"
field = "value"
operator = "equals"
value = "world"
}
}

Expand Down Expand Up @@ -293,7 +304,7 @@ resource "sigsci_site_rule" "testsignal" {
type = "templatedSignal"
group_operator = "all"
enabled = true
reason = "Example site rule update"
reason = ""
signal = "PW-RESET-ATTEMPT"
expiration = ""

Expand All @@ -313,12 +324,14 @@ resource "sigsci_site_rule" "testsignal" {

conditions {
type = "multival"
field = "postParameter"
operator = "exists"
group_operator = "all"
conditions {
field = "name"
operator = "equals"
type = "single"
value = "foo"
value = "submit"
}
}
}
Expand Down

0 comments on commit bd38d33

Please sign in to comment.