-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
57 changed files
with
4,442 additions
and
2,025 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# line comment | ||
|
||
// line comment | ||
|
||
/* | ||
Block comment | ||
*/ | ||
|
||
io_mode = "async" | ||
|
||
service "http" "web_proxy" { | ||
listen_addr = "127.0.0.1:8080" | ||
|
||
process "main" { | ||
command = ["/usr/local/bin/awesome-app", "server"] | ||
} | ||
|
||
process "mgmt" { | ||
command = ["/usr/local/bin/awesome-app", "mgmt"] | ||
} | ||
} | ||
|
||
sum = 1 + addend | ||
|
||
message = "Hello, ${name}!" | ||
|
||
shouty_message = upper(message) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
># line comment | ||
#^ source.hcl comment.line.number-sign.hcl punctuation.definition.comment.hcl | ||
# ^^^^^^^^^^^^^ source.hcl comment.line.number-sign.hcl | ||
> | ||
>// line comment | ||
#^^ source.hcl comment.line.double-slash.hcl punctuation.definition.comment.hcl | ||
# ^^^^^^^^^^^^^ source.hcl comment.line.double-slash.hcl | ||
> | ||
>/* | ||
#^^ source.hcl comment.block.hcl punctuation.definition.comment.hcl | ||
> Block comment | ||
#^^^^^^^^^^^^^^^^ source.hcl comment.block.hcl | ||
>*/ | ||
#^^ source.hcl comment.block.hcl punctuation.definition.comment.hcl | ||
> | ||
>io_mode = "async" | ||
#^^^^^^^ source.hcl variable.declaration.hcl variable.other.readwrite.hcl | ||
# ^ source.hcl variable.declaration.hcl | ||
# ^ source.hcl variable.declaration.hcl keyword.operator.assignment.hcl | ||
# ^ source.hcl variable.declaration.hcl | ||
# ^ source.hcl string.quoted.double.hcl punctuation.definition.string.begin.hcl | ||
# ^^^^^ source.hcl string.quoted.double.hcl | ||
# ^ source.hcl string.quoted.double.hcl punctuation.definition.string.end.hcl | ||
> | ||
>service "http" "web_proxy" { | ||
#^^^^^^^ source.hcl meta.block.hcl entity.name.type.hcl | ||
# ^ source.hcl meta.block.hcl | ||
# ^^^^^^ source.hcl meta.block.hcl variable.other.enummember.hcl | ||
# ^ source.hcl meta.block.hcl | ||
# ^^^^^^^^^^^ source.hcl meta.block.hcl variable.other.enummember.hcl | ||
# ^ source.hcl meta.block.hcl | ||
# ^ source.hcl meta.block.hcl punctuation.section.block.begin.hcl | ||
> listen_addr = "127.0.0.1:8080" | ||
#^^ source.hcl meta.block.hcl | ||
# ^^^^^^^^^^^ source.hcl meta.block.hcl variable.declaration.hcl variable.other.readwrite.hcl | ||
# ^ source.hcl meta.block.hcl variable.declaration.hcl | ||
# ^ source.hcl meta.block.hcl variable.declaration.hcl keyword.operator.assignment.hcl | ||
# ^ source.hcl meta.block.hcl variable.declaration.hcl | ||
# ^ source.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.begin.hcl | ||
# ^^^^^^^^^^^^^^ source.hcl meta.block.hcl string.quoted.double.hcl | ||
# ^ source.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.end.hcl | ||
> | ||
> process "main" { | ||
#^^ source.hcl meta.block.hcl | ||
# ^^^^^^^ source.hcl meta.block.hcl meta.block.hcl entity.name.type.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl | ||
# ^^^^^^ source.hcl meta.block.hcl meta.block.hcl variable.other.enummember.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl punctuation.section.block.begin.hcl | ||
> command = ["/usr/local/bin/awesome-app", "server"] | ||
#^^^^ source.hcl meta.block.hcl meta.block.hcl | ||
# ^^^^^^^ source.hcl meta.block.hcl meta.block.hcl variable.declaration.hcl variable.other.readwrite.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl variable.declaration.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl variable.declaration.hcl keyword.operator.assignment.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl variable.declaration.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl punctuation.section.brackets.begin.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.begin.hcl | ||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.end.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl punctuation.separator.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.begin.hcl | ||
# ^^^^^^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.end.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl punctuation.section.brackets.end.hcl | ||
> } | ||
#^^ source.hcl meta.block.hcl meta.block.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl punctuation.section.block.end.hcl | ||
> | ||
> process "mgmt" { | ||
#^^ source.hcl meta.block.hcl | ||
# ^^^^^^^ source.hcl meta.block.hcl meta.block.hcl entity.name.type.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl | ||
# ^^^^^^ source.hcl meta.block.hcl meta.block.hcl variable.other.enummember.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl punctuation.section.block.begin.hcl | ||
> command = ["/usr/local/bin/awesome-app", "mgmt"] | ||
#^^^^ source.hcl meta.block.hcl meta.block.hcl | ||
# ^^^^^^^ source.hcl meta.block.hcl meta.block.hcl variable.declaration.hcl variable.other.readwrite.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl variable.declaration.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl variable.declaration.hcl keyword.operator.assignment.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl variable.declaration.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl punctuation.section.brackets.begin.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.begin.hcl | ||
# ^^^^^^^^^^^^^^^^^^^^^^^^^^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.end.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl punctuation.separator.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.begin.hcl | ||
# ^^^^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.end.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl punctuation.section.brackets.end.hcl | ||
> } | ||
#^^ source.hcl meta.block.hcl meta.block.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl punctuation.section.block.end.hcl | ||
>} | ||
#^ source.hcl meta.block.hcl punctuation.section.block.end.hcl | ||
> | ||
>sum = 1 + addend | ||
#^^^ source.hcl variable.declaration.hcl variable.other.readwrite.hcl | ||
# ^ source.hcl variable.declaration.hcl | ||
# ^ source.hcl variable.declaration.hcl keyword.operator.assignment.hcl | ||
# ^ source.hcl variable.declaration.hcl | ||
# ^ source.hcl constant.numeric.integer.hcl | ||
# ^ source.hcl | ||
# ^ source.hcl keyword.operator.arithmetic.hcl | ||
# ^^^^^^^^ source.hcl | ||
> | ||
>message = "Hello, ${name}!" | ||
#^^^^^^^ source.hcl variable.declaration.hcl variable.other.readwrite.hcl | ||
# ^ source.hcl variable.declaration.hcl | ||
# ^ source.hcl variable.declaration.hcl keyword.operator.assignment.hcl | ||
# ^ source.hcl variable.declaration.hcl | ||
# ^ source.hcl string.quoted.double.hcl punctuation.definition.string.begin.hcl | ||
# ^^^^^^ source.hcl string.quoted.double.hcl | ||
# ^ source.hcl string.quoted.double.hcl meta.interpolation.hcl | ||
# ^^ source.hcl string.quoted.double.hcl meta.interpolation.hcl keyword.other.interpolation.begin.hcl | ||
# ^^^^ source.hcl string.quoted.double.hcl meta.interpolation.hcl variable.other.readwrite.hcl | ||
# ^ source.hcl string.quoted.double.hcl meta.interpolation.hcl keyword.other.interpolation.end.hcl | ||
# ^ source.hcl string.quoted.double.hcl | ||
# ^ source.hcl string.quoted.double.hcl punctuation.definition.string.end.hcl | ||
> | ||
>shouty_message = upper(message) | ||
#^^^^^^^^^^^^^^ source.hcl variable.declaration.hcl variable.other.readwrite.hcl | ||
# ^ source.hcl variable.declaration.hcl | ||
# ^ source.hcl variable.declaration.hcl keyword.operator.assignment.hcl | ||
# ^ source.hcl variable.declaration.hcl | ||
# ^^^^^ source.hcl meta.function-call.hcl variable.function.hcl | ||
# ^ source.hcl meta.function-call.hcl punctuation.section.parens.begin.hcl | ||
# ^^^^^^^ source.hcl meta.function-call.hcl | ||
# ^ source.hcl meta.function-call.hcl punctuation.section.parens.end.hcl | ||
> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
resource "aws_instance" "web" { | ||
ami = "ami-a1b2c3d4" | ||
instance_type = "t2.micro" | ||
timeouts { | ||
create = "60m" | ||
delete = "2h" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
>resource "aws_instance" "web" { | ||
#^^^^^^^^ source.hcl meta.block.hcl entity.name.type.hcl | ||
# ^ source.hcl meta.block.hcl | ||
# ^^^^^^^^^^^^^^ source.hcl meta.block.hcl variable.other.enummember.hcl | ||
# ^ source.hcl meta.block.hcl | ||
# ^^^^^ source.hcl meta.block.hcl variable.other.enummember.hcl | ||
# ^ source.hcl meta.block.hcl | ||
# ^ source.hcl meta.block.hcl punctuation.section.block.begin.hcl | ||
> ami = "ami-a1b2c3d4" | ||
#^^ source.hcl meta.block.hcl | ||
# ^^^ source.hcl meta.block.hcl variable.declaration.hcl variable.other.readwrite.hcl | ||
# ^^^^^^^^^^^ source.hcl meta.block.hcl variable.declaration.hcl | ||
# ^ source.hcl meta.block.hcl variable.declaration.hcl keyword.operator.assignment.hcl | ||
# ^ source.hcl meta.block.hcl variable.declaration.hcl | ||
# ^ source.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.begin.hcl | ||
# ^^^^^^^^^^^^ source.hcl meta.block.hcl string.quoted.double.hcl | ||
# ^ source.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.end.hcl | ||
> instance_type = "t2.micro" | ||
#^^ source.hcl meta.block.hcl | ||
# ^^^^^^^^^^^^^ source.hcl meta.block.hcl variable.declaration.hcl variable.other.readwrite.hcl | ||
# ^ source.hcl meta.block.hcl variable.declaration.hcl | ||
# ^ source.hcl meta.block.hcl variable.declaration.hcl keyword.operator.assignment.hcl | ||
# ^ source.hcl meta.block.hcl variable.declaration.hcl | ||
# ^ source.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.begin.hcl | ||
# ^^^^^^^^ source.hcl meta.block.hcl string.quoted.double.hcl | ||
# ^ source.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.end.hcl | ||
> timeouts { | ||
#^^ source.hcl meta.block.hcl | ||
# ^^^^^^^^ source.hcl meta.block.hcl meta.block.hcl entity.name.type.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl punctuation.section.block.begin.hcl | ||
> create = "60m" | ||
#^^^^ source.hcl meta.block.hcl meta.block.hcl | ||
# ^^^^^^ source.hcl meta.block.hcl meta.block.hcl variable.declaration.hcl variable.other.readwrite.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl variable.declaration.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl variable.declaration.hcl keyword.operator.assignment.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl variable.declaration.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.begin.hcl | ||
# ^^^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.end.hcl | ||
> delete = "2h" | ||
#^^^^ source.hcl meta.block.hcl meta.block.hcl | ||
# ^^^^^^ source.hcl meta.block.hcl meta.block.hcl variable.declaration.hcl variable.other.readwrite.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl variable.declaration.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl variable.declaration.hcl keyword.operator.assignment.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl variable.declaration.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.begin.hcl | ||
# ^^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.end.hcl | ||
> } | ||
#^^ source.hcl meta.block.hcl meta.block.hcl | ||
# ^ source.hcl meta.block.hcl meta.block.hcl punctuation.section.block.end.hcl | ||
>} | ||
#^ source.hcl meta.block.hcl punctuation.section.block.end.hcl | ||
> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# line comment | ||
|
||
// line comment | ||
|
||
/* | ||
Block comment | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
># line comment | ||
#^ source.hcl comment.line.number-sign.hcl punctuation.definition.comment.hcl | ||
# ^^^^^^^^^^^^^ source.hcl comment.line.number-sign.hcl | ||
> | ||
>// line comment | ||
#^^ source.hcl comment.line.double-slash.hcl punctuation.definition.comment.hcl | ||
# ^^^^^^^^^^^^^ source.hcl comment.line.double-slash.hcl | ||
> | ||
>/* | ||
#^^ source.hcl comment.block.hcl punctuation.definition.comment.hcl | ||
> Block comment | ||
#^^^^^^^^^^^^^^^^ source.hcl comment.block.hcl | ||
>*/ | ||
#^^ source.hcl comment.block.hcl punctuation.definition.comment.hcl | ||
> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
data "aws_ami" "example" { | ||
most_recent = true | ||
|
||
owners = ["self"] | ||
tags = { | ||
Name = "app-server" | ||
Tested = "true" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
>data "aws_ami" "example" { | ||
#^^^^ source.hcl meta.block.hcl entity.name.type.hcl | ||
# ^ source.hcl meta.block.hcl | ||
# ^^^^^^^^^ source.hcl meta.block.hcl variable.other.enummember.hcl | ||
# ^ source.hcl meta.block.hcl | ||
# ^^^^^^^^^ source.hcl meta.block.hcl variable.other.enummember.hcl | ||
# ^ source.hcl meta.block.hcl | ||
# ^ source.hcl meta.block.hcl punctuation.section.block.begin.hcl | ||
> most_recent = true | ||
#^^ source.hcl meta.block.hcl | ||
# ^^^^^^^^^^^ source.hcl meta.block.hcl variable.declaration.hcl variable.other.readwrite.hcl | ||
# ^ source.hcl meta.block.hcl variable.declaration.hcl | ||
# ^ source.hcl meta.block.hcl variable.declaration.hcl keyword.operator.assignment.hcl | ||
# ^ source.hcl meta.block.hcl variable.declaration.hcl | ||
# ^^^^ source.hcl meta.block.hcl constant.language.hcl | ||
> | ||
> owners = ["self"] | ||
#^^ source.hcl meta.block.hcl | ||
# ^^^^^^ source.hcl meta.block.hcl variable.declaration.hcl variable.other.readwrite.hcl | ||
# ^ source.hcl meta.block.hcl variable.declaration.hcl | ||
# ^ source.hcl meta.block.hcl variable.declaration.hcl keyword.operator.assignment.hcl | ||
# ^ source.hcl meta.block.hcl variable.declaration.hcl | ||
# ^ source.hcl meta.block.hcl punctuation.section.brackets.begin.hcl | ||
# ^ source.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.begin.hcl | ||
# ^^^^ source.hcl meta.block.hcl string.quoted.double.hcl | ||
# ^ source.hcl meta.block.hcl string.quoted.double.hcl punctuation.definition.string.end.hcl | ||
# ^ source.hcl meta.block.hcl punctuation.section.brackets.end.hcl | ||
> tags = { | ||
#^^ source.hcl meta.block.hcl | ||
# ^^^^ source.hcl meta.block.hcl variable.declaration.hcl variable.other.readwrite.hcl | ||
# ^ source.hcl meta.block.hcl variable.declaration.hcl | ||
# ^ source.hcl meta.block.hcl variable.declaration.hcl keyword.operator.assignment.hcl | ||
# ^ source.hcl meta.block.hcl variable.declaration.hcl | ||
# ^ source.hcl meta.block.hcl meta.braces.hcl punctuation.section.braces.begin.hcl | ||
> Name = "app-server" | ||
#^^^^ source.hcl meta.block.hcl meta.braces.hcl | ||
# ^^^^ source.hcl meta.block.hcl meta.braces.hcl meta.mapping.key.hcl variable.other.readwrite.hcl | ||
# ^^^ source.hcl meta.block.hcl meta.braces.hcl | ||
# ^ source.hcl meta.block.hcl meta.braces.hcl keyword.operator.assignment.hcl | ||
# ^ source.hcl meta.block.hcl meta.braces.hcl | ||
# ^ source.hcl meta.block.hcl meta.braces.hcl string.quoted.double.hcl punctuation.definition.string.begin.hcl | ||
# ^^^^^^^^^^ source.hcl meta.block.hcl meta.braces.hcl string.quoted.double.hcl | ||
# ^ source.hcl meta.block.hcl meta.braces.hcl string.quoted.double.hcl punctuation.definition.string.end.hcl | ||
> Tested = "true" | ||
#^^^^ source.hcl meta.block.hcl meta.braces.hcl | ||
# ^^^^^^ source.hcl meta.block.hcl meta.braces.hcl meta.mapping.key.hcl variable.other.readwrite.hcl | ||
# ^ source.hcl meta.block.hcl meta.braces.hcl | ||
# ^ source.hcl meta.block.hcl meta.braces.hcl keyword.operator.assignment.hcl | ||
# ^ source.hcl meta.block.hcl meta.braces.hcl | ||
# ^ source.hcl meta.block.hcl meta.braces.hcl string.quoted.double.hcl punctuation.definition.string.begin.hcl | ||
# ^^^^ source.hcl meta.block.hcl meta.braces.hcl string.quoted.double.hcl | ||
# ^ source.hcl meta.block.hcl meta.braces.hcl string.quoted.double.hcl punctuation.definition.string.end.hcl | ||
> } | ||
#^^ source.hcl meta.block.hcl meta.braces.hcl | ||
# ^ source.hcl meta.block.hcl meta.braces.hcl punctuation.section.braces.end.hcl | ||
>} | ||
#^ source.hcl meta.block.hcl punctuation.section.block.end.hcl | ||
> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
var.a != "" ? var.a : "default-a" | ||
var.example ? tostring(12) : "hello" | ||
var.example ? 12 : "hello" |
Oops, something went wrong.