docs: use hcl heredoc syntax for multi line strings in sentinel examples (#4930)

This commit is contained in:
R.B. Boyer 2018-11-08 16:28:40 -06:00 committed by GitHub
parent 2a8951fcc0
commit b153f9be39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 7 deletions

View File

@ -27,9 +27,11 @@ Here's an example:
```text
sentinel {
code = "import \"strings\"
main = rule { strings.has_suffix(value,\"foo\") }"
code = <<EOF
import "strings"
main = rule { strings.has_suffix(value,"foo") }
enforcementlevel = "soft-mandatory"
EOF
}
```
@ -64,8 +66,10 @@ The following are some examples of ACL policies with Sentinel rules.
key "foo" {
policy = "write"
sentinel {
code = "import \"strings\"
main = rule { strings.has_suffix(value, \"bar\") }"
code = <<EOF
import "strings"
main = rule { strings.has_suffix(value, "bar") }
EOF
}
}
```
@ -76,8 +80,10 @@ key "foo" {
key "foo" {
policy = "write"
sentinel {
code = "import \"time\"
main = rule { time.hour > 8 and time.hour < 17 }"
code = <<EOF
import "time"
main = rule { time.hour > 8 and time.hour < 17 }
EOF
}
}
```