Skip to content

Commit

Permalink
Merge pull request #1 from getgrit/add-preset
Browse files Browse the repository at this point in the history
chore: move hcl preset to stdlib
  • Loading branch information
seren5240 authored Mar 17, 2023
2 parents 0cc7dee + f52fca6 commit 8bb10fa
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .grit/patterns/KeyValuePair.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: Key value pair
---

# {{ page.title }}

```grit
`$arg: $red`
```

## Matches a key-value pair

```hcl
default_address = "127.0.0.1"
default_message = upper("Incident: ${incident}")
default_options = {
priority: "High",
color: "Red"
}
incident_rules {
# Rule number 1
rule "down_server" "infrastructure" {
incident = 100
options = var.override_options ? var.override_options : var.default_options
server = default_address
message = default_message
}
}
```

0 comments on commit 8bb10fa

Please sign in to comment.