diff --git a/Terraform.sublime-syntax b/Terraform.sublime-syntax index bb7e10d..db43ed0 100644 --- a/Terraform.sublime-syntax +++ b/Terraform.sublime-syntax @@ -21,7 +21,6 @@ name: Terraform # https://www.terraform.io/docs/language/index.html file_extensions: - tf - - hcl - nomad scope: source.terraform @@ -136,8 +135,8 @@ contexts: named_value_references: - match: '\b({{named_values}})\b' - comment: Constant values available only to Terraform. - scope: support.constant.terraform + comment: Special variables available only to Terraform. + scope: variable.language.terraform type_keywords: - match: '\b({{terraform_type_keywords}})\b' @@ -210,7 +209,7 @@ contexts: comment: Strings scope: punctuation.definition.string.begin.terraform push: - - meta_scope: string.quoted.double.terraform + - meta_scope: meta.string.terraform string.quoted.double.terraform - match: '"' scope: punctuation.definition.string.end.terraform pop: true @@ -223,21 +222,19 @@ contexts: # # https://github.com/hashicorp/hcl2/blob/master/hcl/hclsyntax/spec.md#templates string_interpolation: - - match: (\$|\%)\{ - comment: String interpolation - scope: keyword.other.interpolation.begin.terraform + - match: ([$%]\{)(~)? + captures: + 1: punctuation.section.interpolation.begin.terraform + 2: keyword.operator.template.trim.left.terraform push: - meta_scope: meta.interpolation.terraform - - clear_scopes: 1 # Clear the string.* scope. - - match: \} - scope: keyword.other.interpolation.end.terraform + - meta_content_scope: source.terraform + - clear_scopes: 1 # Clear the string.* scope. + - match: (~)?(\}) + captures: + 1: keyword.operator.template.trim.right.terraform + 2: punctuation.section.interpolation.end.terraform pop: true - - match: \~\s - comment: Trim left whitespace - scope: keyword.operator.template.left.trim.terraform - - match: \s\~ - comment: Trim right whitespace - scope: keyword.operator.template.right.trim.terraform - match: \b(if|else|endif|for|in|endfor)\b comment: if/else/endif and for/in/endfor directives scope: keyword.control.terraform @@ -253,7 +250,7 @@ contexts: 1: keyword.operator.heredoc.terraform 2: keyword.control.heredoc.terraform push: - - meta_content_scope: string.unquoted.heredoc.terraform + - meta_content_scope: meta.string.terraform string.unquoted.heredoc.terraform - match: ^\s*\2\s*$ comment: The heredoc token identifier (second capture above). scope: keyword.control.heredoc.terraform @@ -297,7 +294,7 @@ contexts: scope: keyword.operator.terraform - match: \.\.\. # ... scope: keyword.operator.terraform - - match: "\\:" # : + - match: ':' # : scope: keyword.operator.terraform # Terraform "import" statements @@ -412,7 +409,7 @@ contexts: # https://github.com/hashicorp/hcl2/blob/master/hcl/hclsyntax/spec.md#attribute-access-operator attribute_access: - match: \. - scope: keyword.operator.accessor.terraform + scope: punctuation.accessor.dot.terraform push: - match: "{{identifer}}" comment: Attribute access @@ -472,7 +469,7 @@ contexts: tuple_for_expression: - match: \bfor\b comment: for expression (arrays) - scope: keyword.control.terraform + scope: keyword.control.loop.for.terraform set: - include: for_expression_body - match: \] @@ -488,10 +485,10 @@ contexts: object_for_expression: - match: \bfor\b comment: for expression (arrays) - scope: keyword.control.terraform + scope: keyword.control.loop.for.terraform set: - match: \=\> - scope: storage.type.function.terraform + scope: punctuation.separator.key-value.terraform - include: for_expression_body - match: \} scope: punctuation.section.braces.end.terraform @@ -503,12 +500,12 @@ contexts: for_expression_body: - match: \bin\b comment: in keyword - scope: keyword.operator.word.terraform + scope: keyword.control.loop.in.terraform - match: \bif\b comment: if keyword scope: keyword.control.conditional.terraform - match: '\:' - scope: keyword.operator.terraform + scope: punctuation.section.block.loop.for.terraform - include: expressions - include: comments - include: comma @@ -520,10 +517,10 @@ contexts: # # https://github.com/hashicorp/hcl2/blob/master/hcl/hclsyntax/spec.md#structural-elements block: - - match: '(\b({{terraform_known_blocks}})\b|({{identifer}}))(?=[\s\"\-[:word:]]*(\{))' + - match: (?:\b({{terraform_known_blocks}})\b|({{identifer}}))(?=[\s\"\-[:word:]]*(\{)) captures: - 2: storage.type.terraform - 3: entity.name.type.terraform + 1: keyword.declaration.terraform + 2: entity.name.type.terraform push: - meta_scope: meta.type.terraform - match: \" diff --git a/syntax_test_terraform-vars.tfvars b/syntax_test_terraform-vars.tfvars index 2ce897c..5ba6a6e 100644 --- a/syntax_test_terraform-vars.tfvars +++ b/syntax_test_terraform-vars.tfvars @@ -18,153 +18,27 @@ // foo # ^ source.terraform-vars comment.line.terraform -///// -// Matches at random place in line + punctuation for `#`. -///// - - # bar -# ^ -comment -punctuation -# ^ punctuation.definition.comment.terraform -# ^^^^^ comment.line.terraform - -///// -// Matches at random place in line + punctuation for `//`. -///// - - // baz # blah -# ^ -comment -punctuation -# ^^ punctuation.definition.comment.terraform -# ^^^^^^^^^^^^^ comment.line.terraform - -///////////////////////////////////////////////////////////////////// -// BLOCK COMMENTS -///////////////////////////////////////////////////////////////////// - -///// -// Matches for a single line. -///// - - /* foo */ -# ^ -comment -punctuation -# ^^ punctuation.definition.comment.terraform -# ^^^^^^^^ comment.block.terraform -# ^^ punctuation.definition.comment.terraform - -///// -// Matches over multiple lines. -///// - - /* -# ^ -comment -punctuation -# ^^ punctuation.definition.comment.terraform -# ^^^^ comment.block.terraform - - foo -# ^^^^ comment.block.terraform - - */ -# ^^^^ comment.block.terraform -# ^^ punctuation.definition.comment.terraform - -///// -// Matches inline comments after block ends. -///// - - /* comment */ // inline -# ^ -comment -punctuation -# ^^ punctuation.definition.comment.terraform -# ^^^^^^^^^^^^ comment.block.terraform -# ^^ punctuation.definition.comment.terraform -# ^^^ -comment -punctuation -# ^^ punctuation.definition.comment.terraform -# ^^^^^^^^ comment.line.terraform - ///////////////////////////////////////////////////////////////////// // LANGUAGE CONSTANTS ///////////////////////////////////////////////////////////////////// -///// -// Matches `true`. -///// - true # ^ -constant # ^^^^ constant.language.terraform # ^ -constant -///// -// Matches `false`. -///// - - false -# ^ -constant -# ^^^^^ constant.language.terraform -# ^ -constant - - -///// -// Matches `null`. -///// - - null -# ^ -constant -# ^^^^ constant.language.terraform -# ^ -constant - -///////////////////////////////////////////////////////////////////// -// INTEGER CONSTANTS -///////////////////////////////////////////////////////////////////// - -///// -// Matches integers. -///// - 444 # ^ -constant -numeric # ^^^ constant.numeric.integer.terraform -///// -// Matches zero. -///// - - 0 -# ^ -constant -numeric -# ^ constant.numeric.integer.terraform - -///// -// Matches one. -///// - - 1 -# ^ -constant -numeric -# ^ constant.numeric.integer.terraform - -///// -// Matches large integers. -///// - - 26345645634561 -# ^ -constant -numeric -# ^^^^^^^^^^^^^^ constant.numeric.integer.terraform - -///// -// Ignores integers inside identifiers. -///// aws_route53_zone.main.zone_id -# ^^^^^^^^^^^^^^^^ -numeric -constant -# ^ keyword.operator.accessor.terraform +# ^^^^^^^^^^^^^^^^ -numeric -constant +# ^ punctuation.accessor.dot.terraform # ^^^^ variable.other.member.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^^ variable.other.member.terraform -///////////////////////////////////////////////////////////////////// -// FLOATING-POINT CONSTANTS -///////////////////////////////////////////////////////////////////// - -///// -// Matches floating-point numbers. -///// 1.2 # ^ -constant -numeric @@ -172,70 +46,6 @@ # ^ punctuation.separator.decimal.terraform # ^ constant.numeric.float.terraform -///// -// Matches large floating-point numbers. -///// - - 61.28888888888 -# ^ -constant -numeric -# ^^ constant.numeric.float.terraform -# ^ punctuation.separator.decimal.terraform -# ^^^^^^^^^^^ constant.numeric.float.terraform - -///// -// Matches integers with exponents. -///// - - 1e12 -# ^ -constant -numeric -# ^ constant.numeric.float.terraform -# ^ punctuation.separator.exponent.terraform -# ^^ constant.numeric.float.terraform - -///// -// Matches floats with exponents. -///// - - 1.4E12 -# ^ -constant -numeric -# ^ constant.numeric.float.terraform -# ^ punctuation.separator.decimal.terraform -# ^ constant.numeric.float.terraform -# ^ punctuation.separator.exponent.terraform -# ^^ constant.numeric.float.terraform - -///// -// Matches floats with postive signed exponents. -///// - - 1.4e+12 -# ^ -constant -numeric -# ^ constant.numeric.float.terraform -# ^ punctuation.separator.decimal.terraform -# ^ constant.numeric.float.terraform -# ^^ punctuation.separator.exponent.terraform -# ^^ constant.numeric.float.terraform - -///// -// Matches floats with negative signed exponents. -///// - - 1.4E-12 -# ^ -constant -numeric -# ^ constant.numeric.float.terraform -# ^ punctuation.separator.decimal.terraform -# ^ constant.numeric.float.terraform -# ^^ punctuation.separator.exponent.terraform -# ^^ constant.numeric.float.terraform - -///////////////////////////////////////////////////////////////////// -// STRINGS -///////////////////////////////////////////////////////////////////// - -///// -// Matches punctuation and assigns meta_scope. -///// - "a string" # ^ -punctuation -string # ^ punctuation.definition.string.begin.terraform @@ -243,397 +53,24 @@ # ^ punctuation.definition.string.end.terraform # ^ -punctuation -string -///// -// Matches character escapes. -///// - - "a \n b \r c \t d \" e \udead f \udeadbeef" -# ^ -punctuation -string -# ^ punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.quoted.double.terraform -# ^^ constant.character.escape.terraform -# ^^ constant.character.escape.terraform -# ^^ constant.character.escape.terraform -# ^^ constant.character.escape.terraform -# ^^^^^ constant.character.escape.terraform -# ^^^^^^^^^^ constant.character.escape.terraform -# ^ punctuation.definition.string.end.terraform - -///////////////////////////////////////////////////////////////////// -// STRING INTERPOLATION -///////////////////////////////////////////////////////////////////// - -///// -// Correct scopes during interpolation. -///// - "some ${interpolation} string" # ^ -punctuation -string +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.string.terraform +# ^^^^^^ string.quoted.double.terraform # ^ punctuation.definition.string.begin.terraform -# ^^^^^ string.quoted.double.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^^^^^^^^^^^^ meta.interpolation.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^^^^^^^ string.quoted.double.terraform +# ^^^^^^^^^^^^^^^^ meta.interpolation.terraform +# ^^ punctuation.section.interpolation.begin.terraform +# ^^^^^^^^^^^^^ source.terraform +# ^ punctuation.section.interpolation.end.terraform +# ^^^^^^^^ string.quoted.double.terraform # ^ punctuation.definition.string.end.terraform # ^ -punctuation -string -///// -// Matches left-trim and right-trim. -///// - - "%{~ fff ~}" -# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^ meta.interpolation.terraform keyword.operator.template.left.trim.terraform -# ^^^^^^ meta.interpolation.terraform -# ^^ meta.interpolation.terraform keyword.operator.template.right.trim.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.end.terraform - -///// -// Matches operators -///// - - "${ something ? true : false }" -# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ keyword.other.interpolation.begin.terraform -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.interpolation.terraform -# ^ keyword.operator.terraform -# ^^^^ meta.interpolation.terraform constant.language.terraform -# ^ meta.interpolation.terraform keyword.operator.terraform -# ^^^^^ meta.interpolation.terraform constant.language.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.end.terraform - -///// -// Dot-access attributes in string interpolation -///// - - "hello ${aws_instance.ubuntu}" -# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^ string.quoted.double.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^^^^^^^^^^^^^^^^^^ meta.interpolation.terraform -# ^ meta.interpolation.terraform keyword.operator.accessor.terraform -# ^^^^^^ meta.interpolation.terraform variable.other.member.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.end.terraform - -///// -// Handles function calls -///// - - "${formatdate("DD MMM YYYY hh:mm ZZZ", "2018-01-02T23:12:01Z")}" -# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^^^^^^^^ meta.interpolation.terraform meta.function-call.terraform support.function.builtin.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^^^^^^^^^^^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform punctuation.separator.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^^^^^^^^^^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.end.terraform - -///// -// Handles nested function calls. -///// - - id = "db-final-snapshot-${md5(timestamp())}" -# ^^ variable.declaration.terraform variable.other.readwrite.terraform -# ^^ variable.declaration.terraform keyword.operator.assignment.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^^^^^^^ string.quoted.double.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^ meta.interpolation.terraform meta.function-call.terraform support.function.builtin.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^^^^^^^^ meta.interpolation.terraform meta.function-call.terraform meta.function-call.terraform support.function.builtin.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.end.terraform - -///// -// Includes objects. -//// - - "something ${{test = 3}}" -# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^ string.quoted.double.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^ meta.interpolation.terraform meta.braces.terraform punctuation.section.braces.begin.terraform -# ^^^^ meta.interpolation.terraform meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.interpolation.terraform meta.braces.terraform keyword.operator.terraform -# ^ meta.interpolation.terraform meta.braces.terraform constant.numeric.integer.terraform -# ^ meta.interpolation.terraform meta.braces.terraform punctuation.section.braces.end.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.end.terraform - -///// -// Includes tuples. -//// - - "something ${[1, 2, 3]}" -# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^ string.quoted.double.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^ meta.interpolation.terraform punctuation.section.brackets.begin.terraform -# ^ meta.interpolation.terraform constant.numeric.integer.terraform -# ^ meta.interpolation.terraform punctuation.separator.terraform -# ^ meta.interpolation.terraform constant.numeric.integer.terraform -# ^ meta.interpolation.terraform punctuation.separator.terraform -# ^ meta.interpolation.terraform constant.numeric.integer.terraform -# ^ meta.interpolation.terraform punctuation.section.brackets.end.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.end.terraform - -///// -// Includes named values. -///// - - "${var.something}" -# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^ meta.interpolation.terraform support.constant.terraform -# ^ meta.interpolation.terraform keyword.operator.accessor.terraform -# ^^^^^^^^^ meta.interpolation.terraform variable.other.member.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.end.terraform - -///// -// Handles regexes (various punctuation). -///// - - records = ["${replace("hostname.domain.com:1234", "/(.*):[0-9]{0,26}/", "$1")}"] -# ^^^^^^^ variable.declaration.terraform variable.other.readwrite.terraform -# ^^ variable.declaration.terraform keyword.operator.assignment.terraform -# ^ punctuation.section.brackets.begin.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^^^^^ meta.interpolation.terraform meta.function-call.terraform support.function.builtin.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^^^^^^^^^^^^^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.end.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform punctuation.separator.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^^^^^^^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.end.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform punctuation.separator.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.end.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.end.terraform -# ^ punctuation.section.brackets.end.terraform -# ^ -meta -string -variable -punctuation - -///// -// Handles nested interpolation. -///// - - "${file("${path.module}/text_files/ecs_app")}" -# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^^ meta.interpolation.terraform meta.function-call.terraform support.function.builtin.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.interpolation.terraform meta.function-call.terraform meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^^ meta.interpolation.terraform meta.function-call.terraform meta.interpolation.terraform support.constant.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform meta.interpolation.terraform keyword.operator.accessor.terraform -# ^^^^^^ meta.interpolation.terraform meta.function-call.terraform meta.interpolation.terraform variable.other.member.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^^^^^^^^^^^^^^^^^^^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.end.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.end.terraform - -///////////////////////////////////////////////////////////////////// -// Template If Directives -///////////////////////////////////////////////////////////////////// - -///// -// Matches if/endif directives. -///// - - "${ if name == "Mary" }${name}${ endif ~}" -# ^ -string -punctuation -# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.interpolation.terraform -# ^^ meta.interpolation.terraform keyword.control.terraform -# ^^ meta.interpolation.terraform keyword.operator.terraform -# ^ source.terraform-vars meta.interpolation.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^ source.terraform-vars meta.interpolation.terraform string.quoted.double.terraform -# ^ source.terraform-vars meta.interpolation.terraform string.quoted.double.terraform punctuation.definition.string.end.terraform -# ^ keyword.other.interpolation.end.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^ keyword.other.interpolation.end.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^^^ meta.interpolation.terraform keyword.control.terraform -# ^ meta.interpolation.terraform keyword.operator.template.right.trim.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.end.terraform -# ^ -string -punctuation - -///// -// Matches if/else/endif directives. -///// - - "%{ if name == "Mary" }${name}%{ else }${ "Mary" }%{ endif ~}" -# ^ -string -punctuation -# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.interpolation.terraform -# ^^ meta.interpolation.terraform keyword.control.terraform -# ^^ meta.interpolation.terraform keyword.operator.terraform -# ^ source.terraform-vars meta.interpolation.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^ source.terraform-vars meta.interpolation.terraform string.quoted.double.terraform -# ^ source.terraform-vars meta.interpolation.terraform string.quoted.double.terraform punctuation.definition.string.end.terraform -# ^ keyword.other.interpolation.end.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^ keyword.other.interpolation.end.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^^ meta.interpolation.terraform keyword.control.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^ meta.interpolation.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^ meta.interpolation.terraform string.quoted.double.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^ keyword.other.interpolation.end.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^^^ meta.interpolation.terraform keyword.control.terraform -# ^ meta.interpolation.terraform keyword.operator.template.right.trim.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.end.terraform -# ^ -string -punctuation - -///// -// Matches for/in/endfor directives. -///// - - "%{ for name in var.names ~}${name}%{ endfor ~}" -# ^ -string -punctuation -# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^ keyword.control.terraform -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.interpolation.terraform -# ^^ keyword.control.terraform -# ^^^ meta.interpolation.terraform support.constant.terraform -# ^ meta.interpolation.terraform keyword.operator.accessor.terraform -# ^^^^^ meta.interpolation.terraform variable.other.member.terraform -# ^ keyword.operator.template.right.trim.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^^^^ meta.interpolation.terraform keyword.control.terraform -# ^ meta.interpolation.terraform keyword.operator.template.right.trim.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.end.terraform -# ^ -string -punctuation - -///////////////////////////////////////////////////////////////////// -// Operators -///////////////////////////////////////////////////////////////////// - -///// -// Comparison -///// - - a == b -# ^ -keyword -operator -# ^^ keyword.operator.terraform -# ^ -keyword -operator - - a != b -# ^ -keyword -operator -# ^^ keyword.operator.terraform -# ^ -keyword -operator - - a < b -# ^ -keyword -operator -# ^ keyword.operator.terraform -# ^ -keyword -operator - - a <= b -# ^ -keyword -operator -# ^^ keyword.operator.terraform -# ^ -keyword -operator - - a > b -# ^ -keyword -operator -# ^ keyword.operator.terraform -# ^ -keyword -operator - - a >= b -# ^ -keyword -operator -# ^^ keyword.operator.terraform -# ^ -keyword -operator - -///// -// Arithmetic -///// - a + b # ^ -keyword -operator # ^ keyword.operator.arithmetic.terraform # ^ -keyword -operator - a - b -# ^ -keyword -operator -# ^ keyword.operator.arithmetic.terraform -# ^ -keyword -operator - - a * b -# ^ -keyword -operator -# ^ keyword.operator.arithmetic.terraform -# ^ -keyword -operator - - a / b -# ^ -keyword -operator -# ^ keyword.operator.arithmetic.terraform -# ^ -keyword -operator - - a % b -# ^ -keyword -operator -# ^ keyword.operator.arithmetic.terraform -# ^ -keyword -operator - - -a -# ^ -keyword -operator -# ^ keyword.operator.arithmetic.terraform -# ^ -keyword -operator - -///// -// Logic -///// - - a && b -# ^^ -keyword -operator -# ^^ keyword.operator.logical.terraform -# ^^ -keyword -operator - - a || b -# ^^ -keyword -operator -# ^^ keyword.operator.logical.terraform -# ^^ -keyword -operator - - !a -# ^^ -keyword -operator -# ^ keyword.operator.logical.terraform -# ^^ -keyword -operator - -///// -// Conditional -///// - length(some_list) > 0 ? some_list[0] : default # ^^^^^^ meta.function-call.terraform support.function.builtin.terraform # ^ meta.function-call.terraform punctuation.section.parens.begin.terraform @@ -647,1013 +84,26 @@ # ^ punctuation.section.brackets.end.terraform # ^ keyword.operator.terraform -///// -// Ellipsis -///// - - hhh([55, 2453, 2]...) -# ^^^ meta.function-call.terraform variable.function.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ punctuation.section.brackets.begin.terraform -# ^^ constant.numeric.integer.terraform -# ^ punctuation.separator.terraform -# ^^^^ constant.numeric.integer.terraform -# ^ punctuation.separator.terraform -# ^ constant.numeric.integer.terraform -# ^ punctuation.section.brackets.end.terraform -# ^^^ keyword.operator.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - -///////////////////////////////////////////////////////////////////// -// Brackets: Index Operations and Arrays -///////////////////////////////////////////////////////////////////// - -///// -// Index Operations -///// - - thing[1] -# ^ -punctuation -# ^ punctuation.section.brackets.begin.terraform -# ^ constant.numeric.integer.terraform -# ^ punctuation.section.brackets.end.terraform -# ^ -punctuation - -///// -// Arrays of literals -///// - - ["a", "b", "c"] + [{a = 1}, {g = 2}] # ^ punctuation.section.brackets.begin.terraform -# ^ punctuation.definition.string.begin.terraform -# ^^^ string.quoted.double.terraform -# ^ punctuation.definition.string.end.terraform -# ^ punctuation.separator.terraform -# ^ punctuation.definition.string.begin.terraform -# ^^^ string.quoted.double.terraform -# ^ punctuation.definition.string.end.terraform -# ^ punctuation.separator.terraform -# ^ punctuation.definition.string.begin.terraform -# ^^^ string.quoted.double.terraform -# ^ punctuation.definition.string.end.terraform -# ^ punctuation.section.brackets.end.terraform - -///// -// Allows inline comments -///// +# ^ meta.braces.terraform punctuation.section.braces.begin.terraform +# ^ meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform +# ^ meta.braces.terraform keyword.operator.terraform +# ^ meta.braces.terraform constant.numeric.integer.terraform +# ^ meta.braces.terraform punctuation.section.braces.end.terraform +# ^ punctuation.separator.terraform +# ^ meta.braces.terraform punctuation.section.braces.begin.terraform +# ^ meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform +# ^ meta.braces.terraform keyword.operator.terraform +# ^ meta.braces.terraform constant.numeric.integer.terraform +# ^ meta.braces.terraform punctuation.section.braces.end.terraform +# ^ punctuation.section.brackets.end.terraform - [1, /* inline */ 2] -# ^ punctuation.section.brackets.begin.terraform -# ^ constant.numeric.integer.terraform -# ^ punctuation.separator.terraform -# ^^ punctuation.definition.comment.terraform -# ^^^^^^^^^^^^ comment.block.terraform -# ^^ punctuation.definition.comment.terraform -# ^ constant.numeric.integer.terraform -# ^ punctuation.section.brackets.end.terraform - -///// -// Allows expression over multiple lines -///// - - [ -# ^ punctuation.section.brackets.begin.terraform - 1, -# ^ constant.numeric.integer.terraform -# ^ punctuation.separator.terraform - 2 -# ^ constant.numeric.integer.terraform - ] -# ^ punctuation.section.brackets.end.terraform - -///// -// Allows operators -///// - - [ 1 + 2 ] -# ^ punctuation.section.brackets.begin.terraform -# ^ constant.numeric.integer.terraform -# ^ keyword.operator.arithmetic.terraform -# ^ constant.numeric.integer.terraform -# ^ punctuation.section.brackets.end.terraform - -///// -// Splat operator -///// - - tuple[*].foo.bar[0] -# ^ punctuation.section.brackets.begin.terraform -# ^ punctuation.section.brackets.end.terraform keyword.operator.splat.terraform -# ^ punctuation.section.brackets.end.terraform -# ^ keyword.operator.accessor.terraform -# ^^^ variable.other.member.terraform -# ^ keyword.operator.accessor.terraform -# ^^^ variable.other.member.terraform -# ^ punctuation.section.brackets.begin.terraform -# ^ constant.numeric.integer.terraform -# ^ punctuation.section.brackets.end.terraform - -///// -// Handle nested arrays -///// - - count = [ -# ^^^^^ variable.declaration.terraform variable.other.readwrite.terraform -# ^^ variable.declaration.terraform keyword.operator.assignment.terraform -# ^ punctuation.section.brackets.begin.terraform - [ 1, 2], -# ^ punctuation.section.brackets.begin.terraform -# ^ constant.numeric.integer.terraform -# ^ punctuation.separator.terraform -# ^ constant.numeric.integer.terraform -# ^ punctuation.section.brackets.end.terraform -# ^ punctuation.separator.terraform - [ 6, 7] -# ^ punctuation.section.brackets.begin.terraform -# ^ constant.numeric.integer.terraform -# ^ punctuation.separator.terraform -# ^ constant.numeric.integer.terraform -# ^ punctuation.section.brackets.end.terraform - ] -# ^ punctuation.section.brackets.end.terraform -# ^ -punctuation - -///// -// Attribute-access inside arrays -///// - - [ aws_instance.ubuntu, aws_instance.freebsd ] -# ^ punctuation.section.brackets.begin.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^^ variable.other.member.terraform -# ^ punctuation.separator.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^^^ variable.other.member.terraform -# ^ punctuation.section.brackets.end.terraform - -///// -// Includes functions. -///// - - [ upper("ggh") ] -# ^ punctuation.section.brackets.begin.terraform -# ^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ punctuation.section.brackets.end.terraform - -///// -// Include objects. -///// - - [{a = 1}, {g = 2}] -# ^ punctuation.section.brackets.begin.terraform -# ^ meta.braces.terraform punctuation.section.braces.begin.terraform -# ^ meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.braces.terraform keyword.operator.terraform -# ^ meta.braces.terraform constant.numeric.integer.terraform -# ^ meta.braces.terraform punctuation.section.braces.end.terraform -# ^ punctuation.separator.terraform -# ^ meta.braces.terraform punctuation.section.braces.begin.terraform -# ^ meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.braces.terraform keyword.operator.terraform -# ^ meta.braces.terraform constant.numeric.integer.terraform -# ^ meta.braces.terraform punctuation.section.braces.end.terraform -# ^ punctuation.section.brackets.end.terraform - -///// -// Includes named values -///// - - [local.thing1, local.thing2] -# ^ punctuation.section.brackets.begin.terraform -# ^^^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^^ variable.other.member.terraform -# ^ punctuation.separator.terraform -# ^^^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^^ variable.other.member.terraform -# ^ punctuation.section.brackets.end.terraform - -///////////////////////////////////////////////////////////////////// -// Collections: Objects -///////////////////////////////////////////////////////////////////// - -///// -// Key/value pairs separated by newlines. -///// - - { -# ^ meta.braces.terraform punctuation.section.braces.begin.terraform - name = "John" -# ^^^^ meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.braces.terraform keyword.operator.terraform -# ^ meta.braces.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^ meta.braces.terraform string.quoted.double.terraform - age = 52 -# ^^^ meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.braces.terraform keyword.operator.terraform -# ^^ meta.braces.terraform constant.numeric.integer.terraform - } -# ^ meta.braces.terraform punctuation.section.braces.end.terraform - -///// -// Key/value pairs separated by commas. -///// - - {name = "John", age = 52} -# ^ meta.braces.terraform punctuation.section.braces.begin.terraform -# ^^^^ meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.braces.terraform keyword.operator.terraform -# ^ meta.braces.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^ meta.braces.terraform string.quoted.double.terraform -# ^ meta.braces.terraform punctuation.separator.terraform -# ^^^ meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.braces.terraform punctuation.section.braces.end.terraform - -///// -// Allows operators in key values. -///// - - { name = 1 + 1 } -# ^ meta.braces.terraform punctuation.section.braces.begin.terraform -# ^^^^ meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.braces.terraform keyword.operator.terraform -# ^ meta.braces.terraform constant.numeric.integer.terraform -# ^ meta.braces.terraform keyword.operator.arithmetic.terraform -# ^ meta.braces.terraform constant.numeric.integer.terraform -# ^ meta.braces.terraform punctuation.section.braces.end.terraform -# ^ -meta - -///// -// Allows tuples as key values. -///// - - { list = [ 1, 2, 3 ]} -# ^ meta.braces.terraform punctuation.section.braces.begin.terraform -# ^^^^ meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.braces.terraform keyword.operator.terraform -# ^ meta.braces.terraform punctuation.section.brackets.begin.terraform -# ^ meta.braces.terraform constant.numeric.integer.terraform -# ^ meta.braces.terraform punctuation.separator.terraform -# ^ meta.braces.terraform constant.numeric.integer.terraform -# ^ meta.braces.terraform punctuation.separator.terraform -# ^ meta.braces.terraform constant.numeric.integer.terraform -# ^ meta.braces.terraform punctuation.section.brackets.end.terraform -# ^ meta.braces.terraform punctuation.section.braces.end.terraform -# ^ -meta - -///// -// Allows function calls as values. -///// - - { -# ^ meta.braces.terraform punctuation.section.braces.begin.terraform - a = upper("l"), -# ^ meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.braces.terraform keyword.operator.terraform -# ^^^^^ meta.braces.terraform meta.function-call.terraform support.function.builtin.terraform -# ^ meta.braces.terraform meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.braces.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.braces.terraform meta.function-call.terraform string.quoted.double.terraform -# ^ meta.braces.terraform meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ meta.braces.terraform punctuation.separator.terraform - } -# ^ meta.braces.terraform punctuation.section.braces.end.terraform - -///// -// Allows nested collection literals. -///// - - { -# ^ meta.braces.terraform punctuation.section.braces.begin.terraform - obj1 = { -# ^^^^ meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.braces.terraform keyword.operator.terraform -# ^ meta.braces.terraform meta.braces.terraform punctuation.section.braces.begin.terraform - obj2 = { -# ^^^^ meta.braces.terraform meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.braces.terraform meta.braces.terraform keyword.operator.terraform -# ^ meta.braces.terraform meta.braces.terraform meta.braces.terraform punctuation.section.braces.begin.terraform - value = 5 -# ^^^^^ meta.braces.terraform meta.braces.terraform meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.braces.terraform meta.braces.terraform meta.braces.terraform keyword.operator.terraform -# ^ meta.braces.terraform meta.braces.terraform meta.braces.terraform constant.numeric.integer.terraform - } -# ^ meta.braces.terraform meta.braces.terraform meta.braces.terraform punctuation.section.braces.end.terraform - } -# ^ meta.braces.terraform meta.braces.terraform punctuation.section.braces.end.terraform - } -# ^ meta.braces.terraform punctuation.section.braces.end.terraform -# ^ -meta - -///// -// Allows attribute-access as rvalue, including named values. -///// - - { lvalue = var.rvalue } -# ^ meta.braces.terraform punctuation.section.braces.begin.terraform -# ^^^^^^ meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.braces.terraform keyword.operator.terraform -# ^^^ meta.braces.terraform support.constant.terraform -# ^ meta.braces.terraform keyword.operator.accessor.terraform -# ^^^^^^ meta.braces.terraform variable.other.member.terraform -# ^ meta.braces.terraform punctuation.section.braces.end.terraform -# ^ -meta - -///// -// Allows strings as keys. -///// - - {"gggg" = "gggg"} -# ^ meta.braces.terraform punctuation.section.braces.begin.terraform -# ^ meta.braces.terraform meta.mapping.key.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^ meta.braces.terraform meta.mapping.key.terraform string.quoted.double.terraform -# ^ meta.braces.terraform meta.mapping.key.terraform string.quoted.double.terraform punctuation.definition.string.end.terraform -# ^ meta.braces.terraform keyword.operator.terraform -# ^ meta.braces.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^ meta.braces.terraform string.quoted.double.terraform -# ^ meta.braces.terraform string.quoted.double.terraform punctuation.definition.string.end.terraform -# ^ meta.braces.terraform punctuation.section.braces.end.terraform - -///// -// Allows expressions + operators as keys. -///// - - {(1 + 2) = "gggg"} -# ^ meta.braces.terraform punctuation.section.braces.begin.terraform -# ^ meta.braces.terraform meta.mapping.key.terraform punctuation.section.parens.begin.terraform -# ^ meta.braces.terraform meta.mapping.key.terraform constant.numeric.integer.terraform -# ^ meta.braces.terraform meta.mapping.key.terraform keyword.operator.arithmetic.terraform -# ^ meta.braces.terraform meta.mapping.key.terraform constant.numeric.integer.terraform -# ^ meta.braces.terraform meta.mapping.key.terraform punctuation.section.parens.end.terraform -# ^ meta.braces.terraform keyword.operator.terraform -# ^ meta.braces.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^ meta.braces.terraform string.quoted.double.terraform -# ^ meta.braces.terraform punctuation.section.braces.end.terraform - -///// -// Allows function calls as keys. -///// - - {(func()) = 1} -# ^ meta.braces.terraform punctuation.section.braces.begin.terraform -# ^ meta.braces.terraform meta.mapping.key.terraform punctuation.section.parens.begin.terraform -# ^^^^ meta.braces.terraform meta.mapping.key.terraform meta.function-call.terraform variable.function.terraform -# ^ meta.braces.terraform meta.mapping.key.terraform meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.braces.terraform meta.mapping.key.terraform meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ meta.braces.terraform meta.mapping.key.terraform punctuation.section.parens.end.terraform -# ^ meta.braces.terraform keyword.operator.terraform -# ^ meta.braces.terraform constant.numeric.integer.terraform -# ^ meta.braces.terraform punctuation.section.braces.end.terraform - -///// -// Allows attribute-access as keys. -//// - - {(var.path) = 1} -# ^ meta.braces.terraform punctuation.section.braces.begin.terraform -# ^ meta.braces.terraform meta.mapping.key.terraform punctuation.section.parens.begin.terraform -# ^^^ meta.braces.terraform meta.mapping.key.terraform support.constant.terraform -# ^ meta.braces.terraform meta.mapping.key.terraform keyword.operator.accessor.terraform -# ^^^^ meta.braces.terraform meta.mapping.key.terraform variable.other.member.terraform -# ^ meta.braces.terraform meta.mapping.key.terraform punctuation.section.parens.end.terraform -# ^ meta.braces.terraform keyword.operator.terraform -# ^ meta.braces.terraform constant.numeric.integer.terraform -# ^ meta.braces.terraform punctuation.section.braces.end.terraform - -///////////////////////////////////////////////////////////////////// -// Attribute Access -///////////////////////////////////////////////////////////////////// - -///// -// Matches dot-access -///// - - aws_instance.ubuntu[*].private_dns -# ^ keyword.operator.accessor.terraform -# ^^^^^^ variable.other.member.terraform -# ^ punctuation.section.brackets.begin.terraform -# ^ punctuation.section.brackets.end.terraform keyword.operator.splat.terraform -# ^ punctuation.section.brackets.end.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^^^^^^^ variable.other.member.terraform -# ^ -variable -punctuation - -///// -// Ignores dot-access in string literals -///// - - "aws_instance.ubuntu" -# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^ -variable -# ^^^^^^^^^^^^^^^^^^^^^ string.quoted.double.terraform - -///// -// Matches inside for-expressions -///// - - [for l in var.letters: upper(l)] -# ^ punctuation.section.brackets.begin.terraform -# ^^^ keyword.control.terraform -# ^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform -# ^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^^^ variable.other.member.terraform -# ^ keyword.operator.terraform -# ^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ punctuation.section.brackets.end.terraform - -///// -// Attribute-only splat -///// - - tuple.*.foo.bar[0] -# ^ keyword.operator.accessor.terraform -# ^ keyword.operator.splat.terraform -# ^ keyword.operator.accessor.terraform -# ^^^ variable.other.member.terraform -# ^ keyword.operator.accessor.terraform -# ^^^ variable.other.member.terraform -# ^ punctuation.section.brackets.begin.terraform -# ^ constant.numeric.integer.terraform -# ^ punctuation.section.brackets.end.terraform - -///// -// Matches subscript indexes -///// - - aws_route53_zone.project.name_servers.1 -# ^ keyword.operator.accessor.terraform -# ^^^^^^^ variable.other.member.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^^^^^^^^ variable.other.member.terraform -# ^ keyword.operator.accessor.terraform -# ^ constant.numeric.integer.terraform -# ^ -constant -punctuation -variable - -///////////////////////////////////////////////////////////////////// -// Attribute Definition -///////////////////////////////////////////////////////////////////// - -///// -// Basic definition -///// - - count = length(var.availability_zones) -# ^^^^^ variable.declaration.terraform variable.other.readwrite.terraform -# ^ variable.declaration.terraform keyword.operator.assignment.terraform -# ^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^^ meta.function-call.terraform support.constant.terraform -# ^ meta.function-call.terraform keyword.operator.accessor.terraform -# ^^^^^^^^^^^^^^^^^^ meta.function-call.terraform variable.other.member.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - -///// -// Populate an attribute from a variable value -///// - - (foo) = "baz" -# ^ variable.declaration.terraform punctuation.section.parens.begin.terraform -# ^^^ variable.declaration.terraform variable.other.readwrite.terraform -# ^ variable.declaration.terraform punctuation.section.parens.end.terraform -# ^ variable.declaration.terraform keyword.operator.assignment.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^ string.quoted.double.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.end.terraform - -///////////////////////////////////////////////////////////////////// -// Function Calls -///////////////////////////////////////////////////////////////////// - -///// -// Basic call. -///// - - thing(l) -# ^^^^^ meta.function-call.terraform variable.function.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - -///// -// Matches parameters, attribute-access, literals, operators, commas. -///// - - cidrthingy(aws_vpc.main.cidr_block, 4, count.index+1) -# ^^^^^^^^^^ meta.function-call.terraform variable.function.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^^^^^^ meta.function-call.terraform -# ^ meta.function-call.terraform keyword.operator.accessor.terraform -# ^^^^ meta.function-call.terraform variable.other.member.terraform -# ^ meta.function-call.terraform keyword.operator.accessor.terraform -# ^^^^^^^^^^ meta.function-call.terraform variable.other.member.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^^^^^ meta.function-call.terraform -# ^ meta.function-call.terraform keyword.operator.accessor.terraform -# ^^^^^ meta.function-call.terraform variable.other.member.terraform -# ^ meta.function-call.terraform keyword.operator.arithmetic.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ -meta -function-call -variable - -///// -// Matches arrays and splat as parameters. -///// - - y6y([55, 2453, 2]..., [55555555]) -# ^^^ meta.function-call.terraform variable.function.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^^^^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^^^ meta.function-call.terraform keyword.operator.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^^^^^^^^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - -///// -// Matches objects as parameters. -///// - - some({a = 1, b = "2"}) -# ^^^^ meta.function-call.terraform variable.function.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.section.braces.begin.terraform -# ^ meta.function-call.terraform meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.function-call.terraform meta.braces.terraform keyword.operator.terraform -# ^ meta.function-call.terraform meta.braces.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.function-call.terraform meta.braces.terraform keyword.operator.terraform -# ^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.section.braces.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - -///// -// Nested function calls. -///// - - func(thing(yep(1))) -# ^^^^ meta.function-call.terraform variable.function.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^^^^ meta.function-call.terraform meta.function-call.terraform variable.function.terraform -# ^ meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^^ meta.function-call.terraform meta.function-call.terraform meta.function-call.terraform variable.function.terraform -# ^ meta.function-call.terraform meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform meta.function-call.terraform meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ -function - -///// -// Parameters spanning multiple lines. -///// - - func( -# ^^^^ meta.function-call.terraform variable.function.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform - 1, -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform - 2 -# ^ meta.function-call.terraform constant.numeric.integer.terraform - ) -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - -///// -// Allow object for-expressions. -//// - - thing({for i, v in ["a"]: v => i...}) -# ^^^^^ meta.function-call.terraform variable.function.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.section.braces.begin.terraform -# ^^^ meta.function-call.terraform meta.braces.terraform keyword.control.terraform -# ^ meta.function-call.terraform variable.other.readwrite.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform variable.other.readwrite.terraform -# ^^ meta.function-call.terraform keyword.operator.word.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform keyword.operator.terraform -# ^ meta.function-call.terraform variable.other.readwrite.terraform -# ^^ meta.function-call.terraform storage.type.function.terraform -# ^ meta.function-call.terraform variable.other.readwrite.terraform -# ^^^ meta.function-call.terraform keyword.operator.terraform -# ^ meta.function-call.terraform punctuation.section.braces.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - -///// -// Allow tuple for-expressions. -///// - - func([for v in ["a", "b"]: v]) -# ^^^^ meta.function-call.terraform variable.function.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^^^ meta.function-call.terraform keyword.control.terraform -# ^ meta.function-call.terraform variable.other.readwrite.terraform -# ^^ meta.function-call.terraform keyword.operator.word.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform keyword.operator.terraform -# ^ meta.function-call.terraform variable.other.readwrite.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - -///////////////////////////////////////////////////////////////////// -// Built-in Terraform Functions -// TODO: match % placeholders in format()-family first parameters -// TODO: match regexs in regex()-family first parameters -////////////////////////`///////////////////////////////////////////// - -///// -// Numeric Functions -///// - - abs(23) -# ^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - ceil(5.1) -# ^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^^ meta.function-call.terraform constant.numeric.float.terraform -# ^ meta.function-call.terraform constant.numeric.float.terraform punctuation.separator.decimal.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - floor(5) -# ^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - log(50, 10) -# ^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - max(12, 54, 3) -# ^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - min(12, 54, 3) -# ^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - pow(3, 2) -# ^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - signum(-13) -# ^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform keyword.operator.arithmetic.terraform -# ^^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - -///// -// String Functions -///// - - chomp("hello\n") -# ^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform constant.character.escape.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - format("Hello, %s!", "Ander") -# ^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.end.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - formatlist("Hello, %s!", ["Valentina", "Ander"]) -# ^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - indent(2, "[\n foo,\n bar,\n]\n") -# ^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - join(", ", ["foo", "bar", "baz"]) -# ^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - lower("HELLO") -# ^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - regex("[a-z]+", "53453453.345345aaabbbccc23454") -# ^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - regexall("[a-z]+", "1234abcd5678efgh9") -# ^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - replace("1 + 2 + 3", "+", "-") -# ^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - split(",", "foo") -# ^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - strrev("hello") -# ^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - substr("🤔🤷", 0, 1) -# ^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - title("hello world") -# ^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - trimspace(" hello\n\n") -# ^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - upper("hello") -# ^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - -///// -// Collection Functions -///// - - chunklist(["a", "b"], 2) -# ^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - coalesce("a", "b") -# ^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - coalescelist([], ["c", "d"]) -# ^^^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - compact(["a", "", "b"]) -# ^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.end.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - concat(["a"], ["c"]) -# ^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - contains(["a"], "a") -# ^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - distinct(["a", "b", "a"]) -# ^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - element(["a", "b"], 1) -# ^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - flatten([[["a", "b"]], ["c"]]) -# ^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - index(["a"], "b") -# ^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform + thing(l) +# ^^^^^ meta.function-call.terraform variable.function.terraform +# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform +# ^ meta.function-call.terraform +# ^ meta.function-call.terraform punctuation.section.parens.end.terraform keys({a=1, c=2}) # ^^^^ meta.function-call.terraform support.function.builtin.terraform @@ -1667,1347 +117,55 @@ # ^ meta.function-call.terraform meta.braces.terraform keyword.operator.terraform # ^ meta.function-call.terraform meta.braces.terraform constant.numeric.integer.terraform # ^ meta.function-call.terraform meta.braces.terraform punctuation.section.braces.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - length([]) -# ^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - list("a", "b", "c") -# ^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - lookup({a="ay", b="bee"}, "a", "what?") -# ^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.section.braces.begin.terraform -# ^ meta.function-call.terraform meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.function-call.terraform meta.braces.terraform keyword.operator.terraform -# ^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.function-call.terraform meta.braces.terraform keyword.operator.terraform -# ^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.section.braces.end.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - map("a", "b") -# ^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - matchkeys(["i-123", "i-abc"], ["us-west", "us-east"], ["us-east"]) -# ^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - merge({a="b"}, {e="f"}) -# ^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.section.braces.begin.terraform -# ^ meta.function-call.terraform meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.function-call.terraform meta.braces.terraform keyword.operator.terraform -# ^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.section.braces.end.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.section.braces.begin.terraform -# ^ meta.function-call.terraform meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.function-call.terraform meta.braces.terraform keyword.operator.terraform -# ^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.section.braces.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - range(1, 4) -# ^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - reverse([1, 2, 3]) -# ^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - setintersection(["a", "b"], ["b", "c"]) -# ^^^^^^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - setproduct(["development"], ["app1", "app2"]) -# ^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - setunion(["a"], ["b"], ["d"]) -# ^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - slice(["a", "b"], 1, 1) -# ^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - sort(["e", "d"]) -# ^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform # ^ meta.function-call.terraform punctuation.section.parens.end.terraform - transpose({a = ["1", "2"], b = ["2", "3"]}) -# ^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.section.braces.begin.terraform -# ^ meta.function-call.terraform meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.function-call.terraform meta.braces.terraform keyword.operator.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.function-call.terraform meta.braces.terraform keyword.operator.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.section.braces.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - values({a=3, c=2, d=1}) -# ^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.section.braces.begin.terraform -# ^ meta.function-call.terraform meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.function-call.terraform meta.braces.terraform keyword.operator.terraform -# ^ meta.function-call.terraform meta.braces.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.function-call.terraform meta.braces.terraform keyword.operator.terraform -# ^ meta.function-call.terraform meta.braces.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.function-call.terraform meta.braces.terraform keyword.operator.terraform -# ^ meta.function-call.terraform meta.braces.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.section.braces.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - zipmap(["a", "b"], [1, 2]) -# ^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - -///// -// Encoding Functions -///// - - base64decode("SGVsbG8gV29ybGQ=") -# ^^^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - base64encode("Hello World") -# ^^^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - base64gzip("Hello World") -# ^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - csvdecode("a,b,c\n1,2,3\n4,5,6") -# ^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - jsondecode("{\"hello\": \"world\"}") -# ^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - jsonencode({hello="world"}) -# ^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.section.braces.begin.terraform -# ^^^^^ meta.function-call.terraform meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.function-call.terraform meta.braces.terraform keyword.operator.terraform -# ^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.section.braces.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - urlencode("Hello World") -# ^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - yamldecode("true") -# ^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - yamlencode({a = "b", c = "d"}) -# ^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.section.braces.begin.terraform -# ^ meta.function-call.terraform meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.function-call.terraform meta.braces.terraform keyword.operator.terraform -# ^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.function-call.terraform meta.braces.terraform keyword.operator.terraform -# ^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - -///// -// Filesystem Functions -///// - - abspath(path.root) -# ^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^^^ meta.function-call.terraform support.constant.terraform -# ^ meta.function-call.terraform keyword.operator.accessor.terraform -# ^^^^ meta.function-call.terraform variable.other.member.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - dirname("foo/bar/baz.txt") -# ^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - pathexpand("~/.ssh/id_rsa") -# ^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - basename("foo/bar/baz.txt") -# ^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - file("${path.module}/hello.txt") -# ^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^^ meta.function-call.terraform meta.interpolation.terraform support.constant.terraform -# ^ meta.function-call.terraform meta.interpolation.terraform keyword.operator.accessor.terraform -# ^^^^^^ meta.function-call.terraform meta.interpolation.terraform variable.other.member.terraform -# ^ meta.function-call.terraform meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - fileexists("${path.module}/hello.txt") -# ^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^^ meta.function-call.terraform meta.interpolation.terraform support.constant.terraform -# ^ meta.function-call.terraform meta.interpolation.terraform keyword.operator.accessor.terraform -# ^^^^^^ meta.function-call.terraform meta.interpolation.terraform variable.other.member.terraform -# ^ meta.function-call.terraform meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - fileset(path.module, "files/*.txt") -# ^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^^^ meta.function-call.terraform support.constant.terraform -# ^ meta.function-call.terraform keyword.operator.accessor.terraform -# ^^^^^^ meta.function-call.terraform variable.other.member.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - filebase64("${path.module}/hello.txt") -# ^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^^ meta.function-call.terraform meta.interpolation.terraform support.constant.terraform -# ^ meta.function-call.terraform meta.interpolation.terraform keyword.operator.accessor.terraform -# ^^^^^^ meta.function-call.terraform meta.interpolation.terraform variable.other.member.terraform -# ^ meta.function-call.terraform meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - templatefile("${path.module}/backends.tmpl", { -# ^^^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^^ meta.function-call.terraform meta.interpolation.terraform support.constant.terraform -# ^ meta.function-call.terraform meta.interpolation.terraform keyword.operator.accessor.terraform -# ^^^^^^ meta.function-call.terraform meta.interpolation.terraform variable.other.member.terraform -# ^ meta.function-call.terraform meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^^^^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.section.braces.begin.terraform - port = 8080, -# ^^^^ meta.function-call.terraform meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.function-call.terraform meta.braces.terraform keyword.operator.terraform -# ^^^^ meta.function-call.terraform meta.braces.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform meta.braces.terraform - ip_addrs = ["10.0.0.1", "10.0.0.2"] -# ^^^^^^^^ meta.function-call.terraform meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.function-call.terraform meta.braces.terraform keyword.operator.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.section.brackets.end.terraform - }) -# ^ meta.function-call.terraform meta.braces.terraform punctuation.section.braces.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - -///// -// Date & Time Functions -///// - - formatdate("DD MMM YYYY hh:mm ZZZ", "2018-01-02T23:12:01Z") -# ^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - timeadd("2017-11-22T00:00:00Z", "10m") -# ^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - timestamp() -# ^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - -///// -// Hash & Crypto Functions -///// - - base64sha256("hello world") -# ^^^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - base64sha512("hello world") -# ^^^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - bcrypt("hello world") -# ^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - filebase64sha256(file("filename")) -# ^^^^^^^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^^^ meta.function-call.terraform meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^ meta.function-call.terraform meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ -function - - filebase64sha512(file("filename")) -# ^^^^^^^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^^^ meta.function-call.terraform meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^ meta.function-call.terraform meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ -function - - filemd5(file("filename")) -# ^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^^^ meta.function-call.terraform meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^ meta.function-call.terraform meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - filemd1(file("filename")) -# ^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^^^ meta.function-call.terraform meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^ meta.function-call.terraform meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ -function - - filesha256(file("filename")) -# ^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^^^ meta.function-call.terraform meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^ meta.function-call.terraform meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ -function - - filesha512(file("filename")) -# ^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^^^ meta.function-call.terraform meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^ meta.function-call.terraform meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ -function - - md5("hello world") -# ^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - rsadecrypt(filebase64("${path.module}/ciphertext"), file("privatekey.pem")) -# ^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^^^^^^^^^ meta.function-call.terraform meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform meta.function-call.terraform meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^^ meta.function-call.terraform meta.function-call.terraform meta.interpolation.terraform support.constant.terraform -# ^ meta.function-call.terraform meta.function-call.terraform meta.interpolation.terraform keyword.operator.accessor.terraform -# ^^^^^^ meta.function-call.terraform meta.function-call.terraform meta.interpolation.terraform variable.other.member.terraform -# ^ meta.function-call.terraform meta.function-call.terraform meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^^^^^^^^^^^^ meta.function-call.terraform meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^^^^ meta.function-call.terraform meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^^^^ meta.function-call.terraform meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ -function - - sha1("hello world") -# ^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - sha256("hello world") -# ^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - sha512("hello world") -# ^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - uuid() -# ^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - uuidv5("dns", "www.terraform.io") -# ^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - -///// -// IP Network Functions -///// - - cidrhost("10.12.127.0/20", 16) -# ^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - cidrnetmask("172.16.0.0/12") -# ^^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - cidrsubnet("172.16.0.0/12", 4, 2) -# ^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - -///// -// Type Conversions Functions -///// - - tobool(true) -# ^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^^^ meta.function-call.terraform constant.language.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - tolist(["a", "b", "c"]) -# ^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - tomap({a = 1, b = 2}) -# ^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.section.braces.begin.terraform -# ^ meta.function-call.terraform meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.function-call.terraform meta.braces.terraform keyword.operator.terraform -# ^ meta.function-call.terraform meta.braces.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.function-call.terraform meta.braces.terraform keyword.operator.terraform -# ^ meta.function-call.terraform meta.braces.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform meta.braces.terraform punctuation.section.braces.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - tonumber(1) -# ^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - toset(["a", "b", "c"]) -# ^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - - tostring("hello") -# ^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^ meta.function-call.terraform string.quoted.double.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - -///////////////////////////////////////////////////////////////////// -// TUPLE FOR-EXPRESSIONS -///////////////////////////////////////////////////////////////////// - -///// -// Basic expression. -///// - [for s in var.list : upper(s)] # ^ punctuation.section.brackets.begin.terraform -# ^^^ keyword.control.terraform +# ^^^ keyword.control.loop.for.terraform # ^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform -# ^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform +# ^^ keyword.control.loop.in.terraform +# ^^^ variable.language.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^ variable.other.member.terraform -# ^ keyword.operator.terraform -# ^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform +# ^ punctuation.section.block.loop.for.terraform +# ^^^^^^^^ meta.function-call.terraform +# ^^^^^ support.function.builtin.terraform +# ^ punctuation.section.parens.begin.terraform +# ^ punctuation.section.parens.end.terraform # ^ punctuation.section.brackets.end.terraform -///// -// Object or map source value. -//// - - [for k, v in var.map : length(k) + length(v)] -# ^ punctuation.section.brackets.begin.terraform -# ^^^ keyword.control.terraform -# ^ variable.other.readwrite.terraform -# ^ punctuation.separator.terraform -# ^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform -# ^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform -# ^^^ variable.other.member.terraform -# ^ keyword.operator.terraform -# ^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ keyword.operator.arithmetic.terraform -# ^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ punctuation.section.brackets.end.terraform - -///// -// Complex right-side expressions. -//// - - [for o in var.list : o.interfaces[0].name] -# ^ punctuation.section.brackets.begin.terraform -# ^^^ keyword.control.terraform -# ^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform -# ^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^ variable.other.member.terraform -# ^ keyword.operator.terraform -# ^ variable.other.readwrite.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^^^^^^ variable.other.member.terraform -# ^ punctuation.section.brackets.begin.terraform -# ^ constant.numeric.integer.terraform -# ^ punctuation.section.brackets.end.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^ variable.other.member.terraform -# ^ punctuation.section.brackets.end.terraform - -///// -// Legacy splat expression attribute access. -///// - - [for o in var.list : o.interfaces][0].name -# ^ punctuation.section.brackets.begin.terraform -# ^^^ keyword.control.terraform -# ^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform -# ^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^ variable.other.member.terraform -# ^ keyword.operator.terraform -# ^ variable.other.readwrite.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^^^^^^ variable.other.member.terraform -# ^ punctuation.section.brackets.end.terraform -# ^ punctuation.section.brackets.begin.terraform -# ^ constant.numeric.integer.terraform -# ^ punctuation.section.brackets.end.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^ variable.other.member.terraform - -///// -// Multi-line for-expressions. -///// - - value = [ -# ^^^^^ variable.declaration.terraform variable.other.readwrite.terraform -# ^^ variable.declaration.terraform keyword.operator.assignment.terraform -# ^ punctuation.section.brackets.begin.terraform - for instance in aws_instance.ubuntu: -# ^^^ keyword.control.terraform -# ^^^^^^^^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform -# ^^^^^^^^^^^^ variable.other.readwrite.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^^ variable.other.member.terraform -# ^ keyword.operator.terraform - instance.private_dns -# ^^^^^^^^ variable.other.readwrite.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^^^^^^^ variable.other.member.terraform - ] -# ^ punctuation.section.brackets.end.terraform - -///// -// Match conditional on right-side expression. -///// - - value = [ -# ^^^^^ variable.declaration.terraform variable.other.readwrite.terraform -# ^^ variable.declaration.terraform keyword.operator.assignment.terraform -# ^ punctuation.section.brackets.begin.terraform - for instance in aws_instance.ubuntu: -# ^^^ keyword.control.terraform -# ^^^^^^^^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform -# ^^^^^^^^^^^^ variable.other.readwrite.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^^ variable.other.member.terraform -# ^ keyword.operator.terraform - (instance.public_ip != "" ? list(instance.private_ip, instance.public_ip) : list(instance.private_ip)) -# ^ punctuation.section.parens.begin.terraform -# ^^^^^^^^ variable.other.readwrite.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^^^^^ variable.other.member.terraform -# ^^ keyword.operator.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.end.terraform -# ^ keyword.operator.terraform -# ^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^^^^^^^ meta.function-call.terraform -# ^ meta.function-call.terraform keyword.operator.accessor.terraform -# ^^^^^^^^^^ meta.function-call.terraform variable.other.member.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^^^^^^^^ meta.function-call.terraform -# ^ meta.function-call.terraform keyword.operator.accessor.terraform -# ^^^^^^^^^ meta.function-call.terraform variable.other.member.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ keyword.operator.terraform -# ^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^^^^^^^ meta.function-call.terraform -# ^ meta.function-call.terraform keyword.operator.accessor.terraform -# ^^^^^^^^^^ meta.function-call.terraform variable.other.member.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ punctuation.section.parens.end.terraform - ] -# ^ punctuation.section.brackets.end.terraform - -///// -// Match brackets on right-side expression. -///// - - value = [ -# ^^^^^ variable.declaration.terraform variable.other.readwrite.terraform -# ^^ variable.declaration.terraform keyword.operator.assignment.terraform -# ^ punctuation.section.brackets.begin.terraform - for instance in aws_instance.ubuntu: -# ^^^ keyword.control.terraform -# ^^^^^^^^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform -# ^^^^^^^^^^^^ variable.other.readwrite.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^^ variable.other.member.terraform -# ^ keyword.operator.terraform - (instance.public_ip != "" ? [instance.private_ip, instance.public_ip] : [instance.private_ip]) -# ^ punctuation.section.parens.begin.terraform -# ^^^^^^^^ variable.other.readwrite.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^^^^^ variable.other.member.terraform -# ^^ keyword.operator.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.end.terraform -# ^ keyword.operator.terraform -# ^ punctuation.section.brackets.begin.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^^^^^^ variable.other.member.terraform -# ^ punctuation.separator.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^^^^^ variable.other.member.terraform -# ^ punctuation.section.brackets.end.terraform -# ^ keyword.operator.terraform -# ^ punctuation.section.brackets.begin.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^^^^^^ variable.other.member.terraform -# ^ punctuation.section.brackets.end.terraform -# ^ punctuation.section.parens.end.terraform - ] -# ^ punctuation.section.brackets.end.terraform - -///// -// Match if-conditionals on right-side. -///// - - [for s in var.list : upper(s) if s != ""] -# ^ punctuation.section.brackets.begin.terraform -# ^^^ keyword.control.terraform -# ^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform -# ^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^ variable.other.member.terraform -# ^ keyword.operator.terraform -# ^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform -# ^^ keyword.control.conditional.terraform -# ^ variable.other.readwrite.terraform -# ^^ keyword.operator.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.end.terraform -# ^ punctuation.section.brackets.end.terraform - -///// -// Matches bracket-literals as range expression. -///// - - [for i, v in ["a", "b", "c"]: v if i < 2] -# ^ punctuation.section.brackets.begin.terraform -# ^^^ keyword.control.terraform -# ^ variable.other.readwrite.terraform -# ^ punctuation.separator.terraform -# ^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform -# ^ punctuation.section.brackets.begin.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ string.quoted.double.terraform -# ^ punctuation.separator.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ string.quoted.double.terraform -# ^ punctuation.separator.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ string.quoted.double.terraform -# ^ punctuation.section.brackets.end.terraform -# ^ keyword.operator.terraform -# ^ variable.other.readwrite.terraform -# ^^ keyword.control.conditional.terraform -# ^ variable.other.readwrite.terraform -# ^ keyword.operator.terraform -# ^ constant.numeric.integer.terraform -# ^ punctuation.section.brackets.end.terraform - -///////////////////////////////////////////////////////////////////// -// OBJECT FOR-EXPRESSIONS -///////////////////////////////////////////////////////////////////// - -///// -// Matches basic syntax. -///// - - {for i, v in ["a", "b"]: v => i} -# ^ meta.braces.terraform punctuation.section.braces.begin.terraform -# ^^^ meta.braces.terraform keyword.control.terraform -# ^ variable.other.readwrite.terraform -# ^ punctuation.separator.terraform -# ^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform -# ^ punctuation.section.brackets.begin.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ string.quoted.double.terraform -# ^ punctuation.separator.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ string.quoted.double.terraform -# ^ punctuation.section.brackets.end.terraform -# ^ keyword.operator.terraform -# ^ variable.other.readwrite.terraform -# ^^ storage.type.function.terraform -# ^ variable.other.readwrite.terraform -# ^ punctuation.section.braces.end.terraform -# ^ -meta - -///// -// Matches ellipsis. -///// - {for i, v in ["a"]: v => i...} -# ^ meta.braces.terraform punctuation.section.braces.begin.terraform -# ^^^ meta.braces.terraform keyword.control.terraform +# ^^^^ meta.braces.terraform +# ^ punctuation.section.braces.begin.terraform +# ^^^ keyword.control.loop.for.terraform # ^ variable.other.readwrite.terraform # ^ punctuation.separator.terraform # ^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform +# ^^ keyword.control.loop.in.terraform # ^ punctuation.section.brackets.begin.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ string.quoted.double.terraform +# ^^^ meta.string.terraform string.quoted.double.terraform +# ^ punctuation.definition.string.begin.terraform +# ^ punctuation.definition.string.end.terraform # ^ punctuation.section.brackets.end.terraform -# ^ keyword.operator.terraform +# ^ punctuation.section.block.loop.for.terraform # ^ variable.other.readwrite.terraform -# ^^ storage.type.function.terraform +# ^^ punctuation.separator.key-value.terraform # ^ variable.other.readwrite.terraform # ^^^ keyword.operator.terraform # ^ punctuation.section.braces.end.terraform -///// -// Matches if-conditional. -///// - - {for s in var.list : substr(s, 0, 1) => s... if s != ""} -# ^ meta.braces.terraform punctuation.section.braces.begin.terraform -# ^^^ meta.braces.terraform keyword.control.terraform -# ^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform -# ^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^ variable.other.member.terraform -# ^ keyword.operator.terraform -# ^^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.separator.terraform -# ^ meta.function-call.terraform constant.numeric.integer.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform -# ^^ storage.type.function.terraform -# ^ variable.other.readwrite.terraform -# ^^^ keyword.operator.terraform -# ^^ keyword.control.conditional.terraform -# ^ variable.other.readwrite.terraform -# ^^ keyword.operator.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.end.terraform -# ^ punctuation.section.braces.end.terraform - -///// -// Matches over multiple-lines. -///// - - value = { -# ^^^^^ variable.declaration.terraform variable.other.readwrite.terraform -# ^^ variable.declaration.terraform keyword.operator.assignment.terraform -# ^ meta.braces.terraform punctuation.section.braces.begin.terraform - for l in var.letters: l => -# ^^^ meta.braces.terraform keyword.control.terraform -# ^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform -# ^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^^^ variable.other.member.terraform -# ^ keyword.operator.terraform -# ^ variable.other.readwrite.terraform -# ^^ storage.type.function.terraform - upper(l) -# ^^^^^ meta.function-call.terraform support.function.builtin.terraform -# ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^ meta.function-call.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform - } -# ^ punctuation.section.braces.end.terraform - -///////////////////////////////////////////////////////////////////// -// BLOCKS -///////////////////////////////////////////////////////////////////// - -///// -// Inline block with no labels. -//// - - thing {} -# ^^^^^ meta.type.terraform entity.name.type.terraform -# ^ meta.type.terraform meta.block.terraform punctuation.section.block.begin.terraform -# ^ meta.block.terraform punctuation.section.block.end.terraform - -///// -// Inline block with string labels. -///// - thing "label1" "label2" {} -# ^^^^^ meta.type.terraform entity.name.type.terraform -# ^ meta.type.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^ meta.type.terraform string.quoted.double.terraform -# ^ meta.type.terraform string.quoted.double.terraform punctuation.definition.string.end.terraform -# ^ meta.type.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^ meta.type.terraform string.quoted.double.terraform -# ^ meta.type.terraform string.quoted.double.terraform punctuation.definition.string.end.terraform -# ^ meta.type.terraform meta.block.terraform punctuation.section.block.begin.terraform +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.type.terraform +# ^^^^^ entity.name.type.terraform +# ^^^^^^^^ string.quoted.double.terraform +# ^ punctuation.definition.string.begin.terraform +# ^ punctuation.definition.string.end.terraform +# ^^^^^^^^ string.quoted.double.terraform +# ^ punctuation.definition.string.begin.terraform +# ^ punctuation.definition.string.end.terraform +# ^ meta.block.terraform punctuation.section.block.begin.terraform # ^ meta.block.terraform punctuation.section.block.end.terraform -# ^ -meta -///// -// Inline block with identifier labels. -///// - - thing thing1 thing2 thing3 {} -# ^^^^^ meta.type.terraform entity.name.type.terraform -# ^^^^^^ meta.type.terraform entity.name.label.terraform -# ^^^^^^ meta.type.terraform entity.name.label.terraform -# ^^^^^^ meta.type.terraform entity.name.label.terraform -# ^ meta.type.terraform meta.block.terraform punctuation.section.block.begin.terraform -# ^ meta.block.terraform punctuation.section.block.end.terraform - -////// -// Nested multi-line blocks with expressions. -///// - - resource "aws_security_group" "example" { -# ^^^^^^^^ meta.type.terraform storage.type.terraform -# ^ meta.type.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^^^^^^^^^^^^ meta.type.terraform string.quoted.double.terraform -# ^ meta.type.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^ meta.type.terraform string.quoted.double.terraform -# ^ meta.type.terraform meta.block.terraform punctuation.section.block.begin.terraform - name = "example" -# ^^^^ meta.block.terraform variable.declaration.terraform variable.other.readwrite.terraform -# ^^ meta.block.terraform variable.declaration.terraform keyword.operator.assignment.terraform -# ^ meta.block.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^ meta.block.terraform string.quoted.double.terraform - - dynamic "ingress" { -# ^^^^^^^ meta.block.terraform meta.type.terraform entity.name.type.terraform -# ^ meta.block.terraform meta.type.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^^^ meta.block.terraform meta.type.terraform string.quoted.double.terraform -# ^ meta.block.terraform meta.type.terraform meta.block.terraform punctuation.section.block.begin.terraform - for_each = var.service_ports -# ^^^^^^^^ meta.block.terraform meta.block.terraform variable.declaration.terraform variable.other.readwrite.terraform -# ^^ meta.block.terraform meta.block.terraform variable.declaration.terraform keyword.operator.assignment.terraform -# ^^^ meta.block.terraform meta.block.terraform support.constant.terraform -# ^ meta.block.terraform meta.block.terraform keyword.operator.accessor.terraform -# ^^^^^^^^^^^^^ meta.block.terraform meta.block.terraform variable.other.member.terraform - content { -# ^^^^^^^ meta.block.terraform meta.block.terraform meta.type.terraform entity.name.type.terraform -# ^ meta.block.terraform meta.block.terraform meta.type.terraform meta.block.terraform punctuation.section.block.begin.terraform - from_port = ingress.value -# ^^^^^^^^^ meta.block.terraform meta.block.terraform meta.block.terraform variable.declaration.terraform variable.other.readwrite.terraform -# ^^ meta.block.terraform meta.block.terraform meta.block.terraform variable.declaration.terraform keyword.operator.assignment.terraform -# ^ meta.block.terraform meta.block.terraform meta.block.terraform keyword.operator.accessor.terraform -# ^^^^^ meta.block.terraform meta.block.terraform meta.block.terraform variable.other.member.terraform - to_port = ingress.value -# ^^^^^^^ meta.block.terraform meta.block.terraform meta.block.terraform variable.declaration.terraform variable.other.readwrite.terraform -# ^^ meta.block.terraform meta.block.terraform meta.block.terraform variable.declaration.terraform keyword.operator.assignment.terraform -# ^ meta.block.terraform meta.block.terraform meta.block.terraform keyword.operator.accessor.terraform - protocol = "tcp" + "IP" -# ^^^^^^^^ meta.block.terraform meta.block.terraform meta.block.terraform variable.declaration.terraform variable.other.readwrite.terraform -# ^^ meta.block.terraform meta.block.terraform meta.block.terraform variable.declaration.terraform keyword.operator.assignment.terraform -# ^ meta.block.terraform meta.block.terraform meta.block.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^ meta.block.terraform meta.block.terraform meta.block.terraform string.quoted.double.terraform -# ^ meta.block.terraform meta.block.terraform meta.block.terraform keyword.operator.arithmetic.terraform -# ^ meta.block.terraform meta.block.terraform meta.block.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^ meta.block.terraform meta.block.terraform meta.block.terraform string.quoted.double.terraform - } -# ^ meta.block.terraform meta.block.terraform meta.block.terraform punctuation.section.block.end.terraform - } -# ^ meta.block.terraform meta.block.terraform punctuation.section.block.end.terraform - } -# ^ meta.block.terraform punctuation.section.block.end.terraform -# ^ -meta - -///// -// Matches blocks with functions, objects, tuples. -///// - - thing label1 { -# ^^^^^ meta.type.terraform entity.name.type.terraform -# ^^^^^^ meta.type.terraform entity.name.label.terraform -# ^ meta.type.terraform meta.block.terraform punctuation.section.block.begin.terraform - func = function(param1) -# ^^^^ meta.block.terraform variable.declaration.terraform variable.other.readwrite.terraform -# ^^ meta.block.terraform variable.declaration.terraform keyword.operator.assignment.terraform -# ^^^^^^^^ meta.block.terraform meta.function-call.terraform variable.function.terraform -# ^ meta.block.terraform meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^^^^^ meta.block.terraform meta.function-call.terraform -# ^ meta.block.terraform meta.function-call.terraform punctuation.section.parens.end.terraform - obj = { -# ^^^ meta.block.terraform variable.declaration.terraform variable.other.readwrite.terraform -# ^^ meta.block.terraform variable.declaration.terraform keyword.operator.assignment.terraform - key = "value" -# ^^^ meta.block.terraform meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform -# ^ meta.block.terraform meta.braces.terraform keyword.operator.terraform -# ^ meta.block.terraform meta.braces.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^^^^^ meta.block.terraform meta.braces.terraform string.quoted.double.terraform -# ^ meta.block.terraform meta.braces.terraform string.quoted.double.terraform punctuation.definition.string.end.terraform - } -# ^ meta.block.terraform meta.braces.terraform punctuation.section.braces.end.terraform - tuple = [1, 2] -# ^^^^^ meta.block.terraform variable.declaration.terraform variable.other.readwrite.terraform -# ^^ meta.block.terraform variable.declaration.terraform keyword.operator.assignment.terraform -# ^ meta.block.terraform punctuation.section.brackets.begin.terraform -# ^ meta.block.terraform constant.numeric.integer.terraform -# ^ meta.block.terraform punctuation.separator.terraform -# ^ meta.block.terraform constant.numeric.integer.terraform -# ^ meta.block.terraform punctuation.section.brackets.end.terraform - } -# ^ meta.block.terraform punctuation.section.block.end.terraform -# ^ -meta -block - -///////////////////////////////////////////////////////////////////// -// TERRAFORM NAMED VALUES -///////////////////////////////////////////////////////////////////// - - var.something -# ^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^^^^^ variable.other.member.terraform - - local.something -# ^^^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^^^^^ variable.other.member.terraform - - module.name.output_name -# ^^^^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^ variable.other.member.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^^^^^^^ variable.other.member.terraform - - data.data_type.name -# ^^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^^^^^ variable.other.member.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^ variable.other.member.terraform - - path.module -# ^^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^^ variable.other.member.terraform - - terraform.workspace -# ^^^^^^^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^^^^^ variable.other.member.terraform - -///////////////////////////////////////////////////////////////////// -// TERRAFORM TOP-LEVEL BLOCK TYPES -///////////////////////////////////////////////////////////////////// - - resource {} -# ^^^^^^^^ meta.type.terraform storage.type.terraform -# ^ meta.type.terraform meta.block.terraform punctuation.section.block.begin.terraform -# ^ meta.block.terraform punctuation.section.block.end.terraform - - provider {} -# ^^^^^^^^ meta.type.terraform storage.type.terraform -# ^ meta.type.terraform meta.block.terraform punctuation.section.block.begin.terraform -# ^ meta.block.terraform punctuation.section.block.end.terraform - - variable {} -# ^^^^^^^^ meta.type.terraform storage.type.terraform -# ^ meta.type.terraform meta.block.terraform punctuation.section.block.begin.terraform -# ^ meta.block.terraform punctuation.section.block.end.terraform - - output {} -# ^^^^^^ meta.type.terraform storage.type.terraform -# ^ meta.type.terraform meta.block.terraform punctuation.section.block.begin.terraform -# ^ meta.block.terraform punctuation.section.block.end.terraform - - locals {} -# ^^^^^^ meta.type.terraform storage.type.terraform -# ^ meta.type.terraform meta.block.terraform punctuation.section.block.begin.terraform -# ^ meta.block.terraform punctuation.section.block.end.terraform - - module {} -# ^^^^^^ meta.type.terraform storage.type.terraform -# ^ meta.type.terraform meta.block.terraform punctuation.section.block.begin.terraform -# ^ meta.block.terraform punctuation.section.block.end.terraform - - data {} -# ^^^^ meta.type.terraform storage.type.terraform -# ^ meta.type.terraform meta.block.terraform punctuation.section.block.begin.terraform -# ^ meta.block.terraform punctuation.section.block.end.terraform - - terraform {} -# ^^^^^^^^^ meta.type.terraform storage.type.terraform -# ^ meta.type.terraform meta.block.terraform punctuation.section.block.begin.terraform -# ^ meta.block.terraform punctuation.section.block.end.terraform - -///////////////////////////////////////////////////////////////////// -// TERRAFORM TYPE KEYWORDS -///////////////////////////////////////////////////////////////////// - - string -# ^^^^^^ storage.type.terraform - - any -# ^^^ storage.type.terraform - - number -# ^^^^^^ storage.type.terraform - - bool -# ^^^^ storage.type.terraform - -///////////////////////////////////////////////////////////////////// -// HEREDOCS -///////////////////////////////////////////////////////////////////// - -///// -// Basic example. -///// << EOF # ^^ keyword.operator.heredoc.terraform # ^^^ keyword.control.heredoc.terraform @@ -3016,62 +174,10 @@ EOF # ^^^^ keyword.control.heredoc.terraform -///// -// With leading-spaces-operator. -///// - - <<- END -# ^^^ keyword.operator.heredoc.terraform -# ^^^ keyword.control.heredoc.terraform - heredoc -# ^^^^^^^^ string.unquoted.heredoc.terraform - EOF -# ^^^^ string.unquoted.heredoc.terraform - END -# ^^^^ keyword.control.heredoc.terraform - -///// -// Includes string interpolation. -///// - - <<- END -# ^^^ keyword.operator.heredoc.terraform -# ^^^ keyword.control.heredoc.terraform - Hello, ${var.name} -# ^^^^^^^ string.unquoted.heredoc.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^ meta.interpolation.terraform support.constant.terraform -# ^ meta.interpolation.terraform keyword.operator.accessor.terraform -# ^^^^ meta.interpolation.terraform variable.other.member.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform - END -# ^^^^ keyword.control.heredoc.terraform - -///////////////////////////////////////////////////////////////////// -// IMPORTS -///////////////////////////////////////////////////////////////////// - -///// -// Import with attribute access. -///// - terraform import aws_instance.example i-abcd1234 # ^^^^^^^^^ support.constant.terraform # ^^^^^^ keyword.control.import.terraform # ^^^^^^^^^^^^ entity.name.label.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^^ variable.other.member.terraform # ^^^^^^^^^^ entity.name.label.terraform - -///// -// Import with numeric literals. -///// - - terraform import digitalocean_ssh_key.mykey 263654 -# ^^^^^^^^^ support.constant.terraform -# ^^^^^^ keyword.control.import.terraform -# ^^^^^^^^^^^^^^^^^^^^ entity.name.label.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^ variable.other.member.terraform -# ^^^^^^ constant.numeric.integer.terraform - diff --git a/syntax_test_terraform.tf b/syntax_test_terraform.tf index 7bea6a2..647bde3 100644 --- a/syntax_test_terraform.tf +++ b/syntax_test_terraform.tf @@ -152,10 +152,10 @@ ///// aws_route53_zone.main.zone_id -# ^^^^^^^^^^^^^^^^ -numeric -constant -# ^ keyword.operator.accessor.terraform +# ^^^^^^^^^^^^^^^^ -numeric -constant +# ^ punctuation.accessor.dot.terraform # ^^^^ variable.other.member.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^^ variable.other.member.terraform ///////////////////////////////////////////////////////////////////// @@ -270,10 +270,12 @@ "some ${interpolation} string" # ^ -punctuation -string # ^ punctuation.definition.string.begin.terraform +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.string.terraform # ^^^^^ string.quoted.double.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform +# ^^ meta.interpolation.terraform punctuation.section.interpolation.begin.terraform # ^^^^^^^^^^^^^^ meta.interpolation.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform +# ^^^^^^^^^^^^ source.terraform +# ^ meta.interpolation.terraform punctuation.section.interpolation.end.terraform # ^^^^^^^ string.quoted.double.terraform # ^ punctuation.definition.string.end.terraform # ^ -punctuation -string @@ -283,12 +285,14 @@ ///// "%{~ fff ~}" +# ^^^^^^^^^^^^ meta.string.terraform +# ^^^^^^^^^^ meta.interpolation.terraform # ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^ meta.interpolation.terraform keyword.operator.template.left.trim.terraform -# ^^^^^^ meta.interpolation.terraform -# ^^ meta.interpolation.terraform keyword.operator.template.right.trim.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform +# ^^ meta.interpolation.terraform punctuation.section.interpolation.begin.terraform +# ^ meta.interpolation.terraform keyword.operator.template.trim.left.terraform +# ^^^^^ source.terraform +# ^ keyword.operator.template.trim.right.terraform +# ^ punctuation.section.interpolation.end.terraform # ^ string.quoted.double.terraform punctuation.definition.string.end.terraform ///// @@ -297,13 +301,14 @@ "${ something ? true : false }" # ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ keyword.other.interpolation.begin.terraform +# ^^ punctuation.section.interpolation.begin.terraform # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.interpolation.terraform +# ^^^^^^^^^^^^^^^^^^^^^^^^^^ source.terraform # ^ keyword.operator.terraform # ^^^^ meta.interpolation.terraform constant.language.terraform # ^ meta.interpolation.terraform keyword.operator.terraform # ^^^^^ meta.interpolation.terraform constant.language.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform +# ^ meta.interpolation.terraform punctuation.section.interpolation.end.terraform # ^ string.quoted.double.terraform punctuation.definition.string.end.terraform ///// @@ -313,11 +318,11 @@ "hello ${aws_instance.ubuntu}" # ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform # ^^^^^^^ string.quoted.double.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform +# ^^ meta.interpolation.terraform punctuation.section.interpolation.begin.terraform # ^^^^^^^^^^^^^^^^^^^^ meta.interpolation.terraform -# ^ meta.interpolation.terraform keyword.operator.accessor.terraform +# ^ meta.interpolation.terraform punctuation.accessor.dot.terraform # ^^^^^^ meta.interpolation.terraform variable.other.member.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform +# ^ meta.interpolation.terraform punctuation.section.interpolation.end.terraform # ^ string.quoted.double.terraform punctuation.definition.string.end.terraform ///// @@ -326,7 +331,7 @@ "${formatdate("DD MMM YYYY hh:mm ZZZ", "2018-01-02T23:12:01Z")}" # ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform +# ^^ meta.interpolation.terraform punctuation.section.interpolation.begin.terraform # ^^^^^^^^^^ meta.interpolation.terraform meta.function-call.terraform support.function.builtin.terraform # ^ meta.interpolation.terraform meta.function-call.terraform punctuation.section.parens.begin.terraform # ^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform @@ -335,7 +340,7 @@ # ^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform # ^^^^^^^^^^^^^^^^^^^^^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform # ^ meta.interpolation.terraform meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform +# ^ meta.interpolation.terraform punctuation.section.interpolation.end.terraform # ^ string.quoted.double.terraform punctuation.definition.string.end.terraform ///// @@ -347,14 +352,14 @@ # ^^ variable.declaration.terraform keyword.operator.assignment.terraform # ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform # ^^^^^^^^^^^^^^^^^^ string.quoted.double.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform +# ^^ meta.interpolation.terraform punctuation.section.interpolation.begin.terraform # ^^^ meta.interpolation.terraform meta.function-call.terraform support.function.builtin.terraform # ^ meta.interpolation.terraform meta.function-call.terraform punctuation.section.parens.begin.terraform # ^^^^^^^^^ meta.interpolation.terraform meta.function-call.terraform meta.function-call.terraform support.function.builtin.terraform # ^ meta.interpolation.terraform meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.begin.terraform # ^ meta.interpolation.terraform meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.end.terraform # ^ meta.interpolation.terraform meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform +# ^ meta.interpolation.terraform punctuation.section.interpolation.end.terraform # ^ string.quoted.double.terraform punctuation.definition.string.end.terraform ///// @@ -364,13 +369,13 @@ "something ${{test = 3}}" # ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform # ^^^^^^^^^^ string.quoted.double.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform +# ^^ meta.interpolation.terraform punctuation.section.interpolation.begin.terraform # ^ meta.interpolation.terraform meta.braces.terraform punctuation.section.braces.begin.terraform # ^^^^ meta.interpolation.terraform meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform # ^ meta.interpolation.terraform meta.braces.terraform keyword.operator.terraform # ^ meta.interpolation.terraform meta.braces.terraform constant.numeric.integer.terraform # ^ meta.interpolation.terraform meta.braces.terraform punctuation.section.braces.end.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform +# ^ meta.interpolation.terraform punctuation.section.interpolation.end.terraform # ^ string.quoted.double.terraform punctuation.definition.string.end.terraform ///// @@ -380,7 +385,7 @@ "something ${[1, 2, 3]}" # ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform # ^^^^^^^^^^ string.quoted.double.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform +# ^^ meta.interpolation.terraform punctuation.section.interpolation.begin.terraform # ^ meta.interpolation.terraform punctuation.section.brackets.begin.terraform # ^ meta.interpolation.terraform constant.numeric.integer.terraform # ^ meta.interpolation.terraform punctuation.separator.terraform @@ -388,7 +393,7 @@ # ^ meta.interpolation.terraform punctuation.separator.terraform # ^ meta.interpolation.terraform constant.numeric.integer.terraform # ^ meta.interpolation.terraform punctuation.section.brackets.end.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform +# ^ meta.interpolation.terraform punctuation.section.interpolation.end.terraform # ^ string.quoted.double.terraform punctuation.definition.string.end.terraform ///// @@ -397,11 +402,11 @@ "${var.something}" # ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^ meta.interpolation.terraform support.constant.terraform -# ^ meta.interpolation.terraform keyword.operator.accessor.terraform +# ^^ meta.interpolation.terraform punctuation.section.interpolation.begin.terraform +# ^^^ meta.interpolation.terraform variable.language.terraform +# ^ meta.interpolation.terraform punctuation.accessor.dot.terraform # ^^^^^^^^^ meta.interpolation.terraform variable.other.member.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform +# ^ meta.interpolation.terraform punctuation.section.interpolation.end.terraform # ^ string.quoted.double.terraform punctuation.definition.string.end.terraform ///// @@ -413,7 +418,7 @@ # ^^ variable.declaration.terraform keyword.operator.assignment.terraform # ^ punctuation.section.brackets.begin.terraform # ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform +# ^^ meta.interpolation.terraform punctuation.section.interpolation.begin.terraform # ^^^^^^^ meta.interpolation.terraform meta.function-call.terraform support.function.builtin.terraform # ^ meta.interpolation.terraform meta.function-call.terraform punctuation.section.parens.begin.terraform # ^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform @@ -428,7 +433,7 @@ # ^^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform # ^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.end.terraform # ^ meta.interpolation.terraform meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform +# ^ meta.interpolation.terraform punctuation.section.interpolation.end.terraform # ^ string.quoted.double.terraform punctuation.definition.string.end.terraform # ^ punctuation.section.brackets.end.terraform # ^ -meta -string -variable -punctuation @@ -439,19 +444,19 @@ "${file("${path.module}/text_files/ecs_app")}" # ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform +# ^^ meta.interpolation.terraform punctuation.section.interpolation.begin.terraform # ^^^^ meta.interpolation.terraform meta.function-call.terraform support.function.builtin.terraform # ^ meta.interpolation.terraform meta.function-call.terraform punctuation.section.parens.begin.terraform # ^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.interpolation.terraform meta.function-call.terraform meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^^ meta.interpolation.terraform meta.function-call.terraform meta.interpolation.terraform support.constant.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform meta.interpolation.terraform keyword.operator.accessor.terraform +# ^^ meta.interpolation.terraform meta.function-call.terraform meta.interpolation.terraform punctuation.section.interpolation.begin.terraform +# ^^^^ meta.interpolation.terraform meta.function-call.terraform meta.interpolation.terraform variable.language.terraform +# ^ meta.interpolation.terraform meta.function-call.terraform meta.interpolation.terraform punctuation.accessor.dot.terraform # ^^^^^^ meta.interpolation.terraform meta.function-call.terraform meta.interpolation.terraform variable.other.member.terraform -# ^ meta.interpolation.terraform meta.function-call.terraform meta.interpolation.terraform keyword.other.interpolation.end.terraform +# ^ meta.interpolation.terraform meta.function-call.terraform meta.interpolation.terraform punctuation.section.interpolation.end.terraform # ^^^^^^^^^^^^^^^^^^^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform # ^ meta.interpolation.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.end.terraform # ^ meta.interpolation.terraform meta.function-call.terraform punctuation.section.parens.end.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform +# ^ meta.interpolation.terraform punctuation.section.interpolation.end.terraform # ^ string.quoted.double.terraform punctuation.definition.string.end.terraform ///////////////////////////////////////////////////////////////////// @@ -465,20 +470,20 @@ "${ if name == "Mary" }${name}${ endif ~}" # ^ -string -punctuation # ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform +# ^^ meta.interpolation.terraform punctuation.section.interpolation.begin.terraform # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.interpolation.terraform # ^^ meta.interpolation.terraform keyword.control.terraform # ^^ meta.interpolation.terraform keyword.operator.terraform # ^ source.terraform meta.interpolation.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform # ^^^^^^ source.terraform meta.interpolation.terraform string.quoted.double.terraform # ^ source.terraform meta.interpolation.terraform string.quoted.double.terraform punctuation.definition.string.end.terraform -# ^ keyword.other.interpolation.end.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^ keyword.other.interpolation.end.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform +# ^ punctuation.section.interpolation.end.terraform +# ^^ meta.interpolation.terraform punctuation.section.interpolation.begin.terraform +# ^ punctuation.section.interpolation.end.terraform +# ^^ meta.interpolation.terraform punctuation.section.interpolation.begin.terraform # ^^^^^ meta.interpolation.terraform keyword.control.terraform -# ^ meta.interpolation.terraform keyword.operator.template.right.trim.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform +# ^ meta.interpolation.terraform keyword.operator.template.trim.right.terraform +# ^ meta.interpolation.terraform punctuation.section.interpolation.end.terraform # ^ string.quoted.double.terraform punctuation.definition.string.end.terraform # ^ -string -punctuation @@ -489,28 +494,28 @@ "%{ if name == "Mary" }${name}%{ else }${ "Mary" }%{ endif ~}" # ^ -string -punctuation # ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform +# ^^ meta.interpolation.terraform punctuation.section.interpolation.begin.terraform # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.interpolation.terraform # ^^ meta.interpolation.terraform keyword.control.terraform # ^^ meta.interpolation.terraform keyword.operator.terraform # ^ source.terraform meta.interpolation.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform # ^^^^^^ source.terraform meta.interpolation.terraform string.quoted.double.terraform # ^ source.terraform meta.interpolation.terraform string.quoted.double.terraform punctuation.definition.string.end.terraform -# ^ keyword.other.interpolation.end.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^ keyword.other.interpolation.end.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform +# ^ punctuation.section.interpolation.end.terraform +# ^^ meta.interpolation.terraform punctuation.section.interpolation.begin.terraform +# ^ punctuation.section.interpolation.end.terraform +# ^^ meta.interpolation.terraform punctuation.section.interpolation.begin.terraform # ^^^^ meta.interpolation.terraform keyword.control.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform +# ^ meta.interpolation.terraform punctuation.section.interpolation.end.terraform +# ^^ meta.interpolation.terraform punctuation.section.interpolation.begin.terraform # ^ meta.interpolation.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform # ^^^^^ meta.interpolation.terraform string.quoted.double.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^ keyword.other.interpolation.end.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform +# ^ meta.interpolation.terraform punctuation.section.interpolation.end.terraform +# ^ punctuation.section.interpolation.end.terraform +# ^^ meta.interpolation.terraform punctuation.section.interpolation.begin.terraform # ^^^^^ meta.interpolation.terraform keyword.control.terraform -# ^ meta.interpolation.terraform keyword.operator.template.right.trim.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform +# ^ meta.interpolation.terraform keyword.operator.template.trim.right.terraform +# ^ meta.interpolation.terraform punctuation.section.interpolation.end.terraform # ^ string.quoted.double.terraform punctuation.definition.string.end.terraform # ^ -string -punctuation @@ -519,23 +524,23 @@ ///// "%{ for name in var.names ~}${name}%{ endfor ~}" -# ^ -string -punctuation +# ^ -string -punctuation # ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform +# ^^ meta.interpolation.terraform punctuation.section.interpolation.begin.terraform # ^^^ keyword.control.terraform # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.interpolation.terraform # ^^ keyword.control.terraform -# ^^^ meta.interpolation.terraform support.constant.terraform -# ^ meta.interpolation.terraform keyword.operator.accessor.terraform +# ^^^ meta.interpolation.terraform variable.language.terraform +# ^ meta.interpolation.terraform punctuation.accessor.dot.terraform # ^^^^^ meta.interpolation.terraform variable.other.member.terraform -# ^ keyword.operator.template.right.trim.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform +# ^ keyword.operator.template.trim.right.terraform +# ^ meta.interpolation.terraform punctuation.section.interpolation.end.terraform +# ^^ meta.interpolation.terraform punctuation.section.interpolation.begin.terraform +# ^ meta.interpolation.terraform punctuation.section.interpolation.end.terraform +# ^^ meta.interpolation.terraform punctuation.section.interpolation.begin.terraform # ^^^^^^ meta.interpolation.terraform keyword.control.terraform -# ^ meta.interpolation.terraform keyword.operator.template.right.trim.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform +# ^ meta.interpolation.terraform keyword.operator.template.trim.right.terraform +# ^ meta.interpolation.terraform punctuation.section.interpolation.end.terraform # ^ string.quoted.double.terraform punctuation.definition.string.end.terraform # ^ -string -punctuation @@ -550,12 +555,12 @@ a == b # ^ -keyword -operator # ^^ keyword.operator.terraform -# ^ -keyword -operator +# ^ -keyword -operator a != b # ^ -keyword -operator # ^^ keyword.operator.terraform -# ^ -keyword -operator +# ^ -keyword -operator a < b # ^ -keyword -operator @@ -568,7 +573,7 @@ # ^ -keyword -operator a > b -# ^ -keyword -operator +# ^ -keyword -operator # ^ keyword.operator.terraform # ^ -keyword -operator @@ -608,8 +613,8 @@ -a # ^ -keyword -operator -# ^ keyword.operator.arithmetic.terraform -# ^ -keyword -operator +# ^ keyword.operator.arithmetic.terraform +# ^ -keyword -operator ///// // Logic @@ -661,7 +666,7 @@ # ^ punctuation.separator.terraform # ^ constant.numeric.integer.terraform # ^ punctuation.section.brackets.end.terraform -# ^^^ keyword.operator.terraform +# ^^^ keyword.operator.terraform # ^ meta.function-call.terraform punctuation.section.parens.end.terraform ///////////////////////////////////////////////////////////////////// @@ -673,7 +678,7 @@ ///// thing[1] -# ^ -punctuation +# ^ -punctuation # ^ punctuation.section.brackets.begin.terraform # ^ constant.numeric.integer.terraform # ^ punctuation.section.brackets.end.terraform @@ -745,9 +750,9 @@ # ^ punctuation.section.brackets.begin.terraform # ^ punctuation.section.brackets.end.terraform keyword.operator.splat.terraform # ^ punctuation.section.brackets.end.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^ variable.other.member.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^ variable.other.member.terraform # ^ punctuation.section.brackets.begin.terraform # ^ constant.numeric.integer.terraform @@ -784,17 +789,17 @@ [ aws_instance.ubuntu, aws_instance.freebsd ] # ^ punctuation.section.brackets.begin.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^ variable.other.member.terraform # ^ punctuation.separator.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^^ variable.other.member.terraform # ^ punctuation.section.brackets.end.terraform ///// // Includes functions. ///// - + [ upper("ggh") ] # ^ punctuation.section.brackets.begin.terraform # ^^^^^ meta.function-call.terraform support.function.builtin.terraform @@ -821,7 +826,7 @@ # ^ meta.braces.terraform keyword.operator.terraform # ^ meta.braces.terraform constant.numeric.integer.terraform # ^ meta.braces.terraform punctuation.section.braces.end.terraform -# ^ punctuation.section.brackets.end.terraform +# ^ punctuation.section.brackets.end.terraform ///// // Includes named values @@ -829,12 +834,12 @@ [local.thing1, local.thing2] # ^ punctuation.section.brackets.begin.terraform -# ^^^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform +# ^^^^^ variable.language.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^ variable.other.member.terraform # ^ punctuation.separator.terraform -# ^^^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform +# ^^^^^ variable.language.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^ variable.other.member.terraform # ^ punctuation.section.brackets.end.terraform @@ -958,8 +963,8 @@ # ^ meta.braces.terraform punctuation.section.braces.begin.terraform # ^^^^^^ meta.braces.terraform meta.mapping.key.terraform string.unquoted.terraform # ^ meta.braces.terraform keyword.operator.terraform -# ^^^ meta.braces.terraform support.constant.terraform -# ^ meta.braces.terraform keyword.operator.accessor.terraform +# ^^^ meta.braces.terraform variable.language.terraform +# ^ meta.braces.terraform punctuation.accessor.dot.terraform # ^^^^^^ meta.braces.terraform variable.other.member.terraform # ^ meta.braces.terraform punctuation.section.braces.end.terraform # ^ -meta @@ -1017,8 +1022,8 @@ {(var.path) = 1} # ^ meta.braces.terraform punctuation.section.braces.begin.terraform # ^ meta.braces.terraform meta.mapping.key.terraform punctuation.section.parens.begin.terraform -# ^^^ meta.braces.terraform meta.mapping.key.terraform support.constant.terraform -# ^ meta.braces.terraform meta.mapping.key.terraform keyword.operator.accessor.terraform +# ^^^ meta.braces.terraform meta.mapping.key.terraform variable.language.terraform +# ^ meta.braces.terraform meta.mapping.key.terraform punctuation.accessor.dot.terraform # ^^^^ meta.braces.terraform meta.mapping.key.terraform variable.other.member.terraform # ^ meta.braces.terraform meta.mapping.key.terraform punctuation.section.parens.end.terraform # ^ meta.braces.terraform keyword.operator.terraform @@ -1034,14 +1039,14 @@ ///// aws_instance.ubuntu[*].private_dns -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^ variable.other.member.terraform # ^ punctuation.section.brackets.begin.terraform # ^ punctuation.section.brackets.end.terraform keyword.operator.splat.terraform # ^ punctuation.section.brackets.end.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^^^^^^ variable.other.member.terraform -# ^ -variable -punctuation +# ^ -variable -punctuation ///// // Ignores dot-access in string literals @@ -1058,13 +1063,13 @@ [for l in var.letters: upper(l)] # ^ punctuation.section.brackets.begin.terraform -# ^^^ keyword.control.terraform +# ^^^ keyword.control.loop.for.terraform # ^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform -# ^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform +# ^^ keyword.control.loop.in.terraform +# ^^^ variable.language.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^^ variable.other.member.terraform -# ^ keyword.operator.terraform +# ^ punctuation.section.block.loop.for.terraform # ^^^^^ meta.function-call.terraform support.function.builtin.terraform # ^ meta.function-call.terraform punctuation.section.parens.begin.terraform # ^ meta.function-call.terraform @@ -1076,11 +1081,11 @@ ///// tuple.*.foo.bar[0] -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^ keyword.operator.splat.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^ variable.other.member.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^ variable.other.member.terraform # ^ punctuation.section.brackets.begin.terraform # ^ constant.numeric.integer.terraform @@ -1091,11 +1096,11 @@ ///// aws_route53_zone.project.name_servers.1 -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^^ variable.other.member.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^^^^^^^ variable.other.member.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^ constant.numeric.integer.terraform # ^ -constant -punctuation -variable @@ -1112,8 +1117,8 @@ # ^ variable.declaration.terraform keyword.operator.assignment.terraform # ^^^^^^ meta.function-call.terraform support.function.builtin.terraform # ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^^ meta.function-call.terraform support.constant.terraform -# ^ meta.function-call.terraform keyword.operator.accessor.terraform +# ^^^ meta.function-call.terraform variable.language.terraform +# ^ meta.function-call.terraform punctuation.accessor.dot.terraform # ^^^^^^^^^^^^^^^^^^ meta.function-call.terraform variable.other.member.terraform # ^ meta.function-call.terraform punctuation.section.parens.end.terraform @@ -1128,7 +1133,7 @@ # ^ variable.declaration.terraform keyword.operator.assignment.terraform # ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform # ^^^^^ string.quoted.double.terraform -# ^ string.quoted.double.terraform punctuation.definition.string.end.terraform +# ^ string.quoted.double.terraform punctuation.definition.string.end.terraform ///////////////////////////////////////////////////////////////////// // Function Calls @@ -1152,15 +1157,15 @@ # ^^^^^^^^^^ meta.function-call.terraform variable.function.terraform # ^ meta.function-call.terraform punctuation.section.parens.begin.terraform # ^^^^^^^ meta.function-call.terraform -# ^ meta.function-call.terraform keyword.operator.accessor.terraform +# ^ meta.function-call.terraform punctuation.accessor.dot.terraform # ^^^^ meta.function-call.terraform variable.other.member.terraform -# ^ meta.function-call.terraform keyword.operator.accessor.terraform +# ^ meta.function-call.terraform punctuation.accessor.dot.terraform # ^^^^^^^^^^ meta.function-call.terraform variable.other.member.terraform # ^ meta.function-call.terraform punctuation.separator.terraform # ^ meta.function-call.terraform constant.numeric.integer.terraform # ^ meta.function-call.terraform punctuation.separator.terraform # ^^^^^ meta.function-call.terraform -# ^ meta.function-call.terraform keyword.operator.accessor.terraform +# ^ meta.function-call.terraform punctuation.accessor.dot.terraform # ^^^^^ meta.function-call.terraform variable.other.member.terraform # ^ meta.function-call.terraform keyword.operator.arithmetic.terraform # ^ meta.function-call.terraform constant.numeric.integer.terraform @@ -1205,7 +1210,7 @@ # ^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform # ^^ meta.function-call.terraform meta.braces.terraform string.quoted.double.terraform # ^ meta.function-call.terraform meta.braces.terraform punctuation.section.braces.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform +# ^ meta.function-call.terraform punctuation.section.parens.end.terraform ///// // Nested function calls. @@ -1247,18 +1252,18 @@ # ^^^^^ meta.function-call.terraform variable.function.terraform # ^ meta.function-call.terraform punctuation.section.parens.begin.terraform # ^ meta.function-call.terraform meta.braces.terraform punctuation.section.braces.begin.terraform -# ^^^ meta.function-call.terraform meta.braces.terraform keyword.control.terraform +# ^^^ meta.function-call.terraform meta.braces.terraform keyword.control.loop.for.terraform # ^ meta.function-call.terraform variable.other.readwrite.terraform # ^ meta.function-call.terraform punctuation.separator.terraform # ^ meta.function-call.terraform variable.other.readwrite.terraform -# ^^ meta.function-call.terraform keyword.operator.word.terraform +# ^^ meta.function-call.terraform keyword.control.loop.in.terraform # ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform # ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform # ^^ meta.function-call.terraform string.quoted.double.terraform # ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform keyword.operator.terraform +# ^ meta.function-call.terraform punctuation.section.block.loop.for.terraform # ^ meta.function-call.terraform variable.other.readwrite.terraform -# ^^ meta.function-call.terraform storage.type.function.terraform +# ^^ meta.function-call.terraform punctuation.separator.key-value.terraform # ^ meta.function-call.terraform variable.other.readwrite.terraform # ^^^ meta.function-call.terraform keyword.operator.terraform # ^ meta.function-call.terraform punctuation.section.braces.end.terraform @@ -1272,9 +1277,9 @@ # ^^^^ meta.function-call.terraform variable.function.terraform # ^ meta.function-call.terraform punctuation.section.parens.begin.terraform # ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform -# ^^^ meta.function-call.terraform keyword.control.terraform +# ^^^ meta.function-call.terraform keyword.control.loop.for.terraform # ^ meta.function-call.terraform variable.other.readwrite.terraform -# ^^ meta.function-call.terraform keyword.operator.word.terraform +# ^^ meta.function-call.terraform keyword.control.loop.in.terraform # ^ meta.function-call.terraform punctuation.section.brackets.begin.terraform # ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform # ^^ meta.function-call.terraform string.quoted.double.terraform @@ -1282,10 +1287,10 @@ # ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform # ^^ meta.function-call.terraform string.quoted.double.terraform # ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform keyword.operator.terraform +# ^ meta.function-call.terraform punctuation.section.block.loop.for.terraform # ^ meta.function-call.terraform variable.other.readwrite.terraform # ^ meta.function-call.terraform punctuation.section.brackets.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform +# ^ meta.function-call.terraform punctuation.section.parens.end.terraform ///////////////////////////////////////////////////////////////////// // Built-in Terraform Functions @@ -1425,7 +1430,7 @@ # ^^^^ meta.function-call.terraform string.quoted.double.terraform # ^ meta.function-call.terraform punctuation.section.brackets.end.terraform # ^ meta.function-call.terraform punctuation.section.parens.end.terraform - + lower("HELLO") # ^^^^^ meta.function-call.terraform support.function.builtin.terraform # ^ meta.function-call.terraform punctuation.section.parens.begin.terraform @@ -1452,7 +1457,7 @@ # ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform # ^^^^^^^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform # ^ meta.function-call.terraform punctuation.section.parens.end.terraform - + replace("1 + 2 + 3", "+", "-") # ^^^^^^^ meta.function-call.terraform support.function.builtin.terraform # ^ meta.function-call.terraform punctuation.section.parens.begin.terraform @@ -1584,7 +1589,7 @@ # ^^ meta.function-call.terraform string.quoted.double.terraform # ^ meta.function-call.terraform punctuation.section.brackets.end.terraform # ^ meta.function-call.terraform punctuation.section.parens.end.terraform - + contains(["a"], "a") # ^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform # ^ meta.function-call.terraform punctuation.section.parens.begin.terraform @@ -1667,7 +1672,7 @@ # ^ meta.function-call.terraform meta.braces.terraform keyword.operator.terraform # ^ meta.function-call.terraform meta.braces.terraform constant.numeric.integer.terraform # ^ meta.function-call.terraform meta.braces.terraform punctuation.section.braces.end.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform +# ^ meta.function-call.terraform punctuation.section.parens.end.terraform length([]) # ^^^^^^ meta.function-call.terraform support.function.builtin.terraform @@ -2015,8 +2020,8 @@ abspath(path.root) # ^^^^^^^ meta.function-call.terraform support.function.builtin.terraform # ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^^^ meta.function-call.terraform support.constant.terraform -# ^ meta.function-call.terraform keyword.operator.accessor.terraform +# ^^^^ meta.function-call.terraform variable.language.terraform +# ^ meta.function-call.terraform punctuation.accessor.dot.terraform # ^^^^ meta.function-call.terraform variable.other.member.terraform # ^ meta.function-call.terraform punctuation.section.parens.end.terraform @@ -2045,11 +2050,11 @@ # ^^^^ meta.function-call.terraform support.function.builtin.terraform # ^ meta.function-call.terraform punctuation.section.parens.begin.terraform # ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^^ meta.function-call.terraform meta.interpolation.terraform support.constant.terraform -# ^ meta.function-call.terraform meta.interpolation.terraform keyword.operator.accessor.terraform +# ^^ meta.function-call.terraform meta.interpolation.terraform punctuation.section.interpolation.begin.terraform +# ^^^^ meta.function-call.terraform meta.interpolation.terraform variable.language.terraform +# ^ meta.function-call.terraform meta.interpolation.terraform punctuation.accessor.dot.terraform # ^^^^^^ meta.function-call.terraform meta.interpolation.terraform variable.other.member.terraform -# ^ meta.function-call.terraform meta.interpolation.terraform keyword.other.interpolation.end.terraform +# ^ meta.function-call.terraform meta.interpolation.terraform punctuation.section.interpolation.end.terraform # ^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform # ^ meta.function-call.terraform punctuation.section.parens.end.terraform @@ -2057,19 +2062,19 @@ # ^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform # ^ meta.function-call.terraform punctuation.section.parens.begin.terraform # ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^^ meta.function-call.terraform meta.interpolation.terraform support.constant.terraform -# ^ meta.function-call.terraform meta.interpolation.terraform keyword.operator.accessor.terraform +# ^^ meta.function-call.terraform meta.interpolation.terraform punctuation.section.interpolation.begin.terraform +# ^^^^ meta.function-call.terraform meta.interpolation.terraform variable.language.terraform +# ^ meta.function-call.terraform meta.interpolation.terraform punctuation.accessor.dot.terraform # ^^^^^^ meta.function-call.terraform meta.interpolation.terraform variable.other.member.terraform -# ^ meta.function-call.terraform meta.interpolation.terraform keyword.other.interpolation.end.terraform +# ^ meta.function-call.terraform meta.interpolation.terraform punctuation.section.interpolation.end.terraform # ^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform # ^ meta.function-call.terraform punctuation.section.parens.end.terraform fileset(path.module, "files/*.txt") # ^^^^^^^ meta.function-call.terraform support.function.builtin.terraform # ^ meta.function-call.terraform punctuation.section.parens.begin.terraform -# ^^^^ meta.function-call.terraform support.constant.terraform -# ^ meta.function-call.terraform keyword.operator.accessor.terraform +# ^^^^ meta.function-call.terraform variable.language.terraform +# ^ meta.function-call.terraform punctuation.accessor.dot.terraform # ^^^^^^ meta.function-call.terraform variable.other.member.terraform # ^ meta.function-call.terraform punctuation.separator.terraform # ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform @@ -2080,11 +2085,11 @@ # ^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform # ^ meta.function-call.terraform punctuation.section.parens.begin.terraform # ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^^ meta.function-call.terraform meta.interpolation.terraform support.constant.terraform -# ^ meta.function-call.terraform meta.interpolation.terraform keyword.operator.accessor.terraform +# ^^ meta.function-call.terraform meta.interpolation.terraform punctuation.section.interpolation.begin.terraform +# ^^^^ meta.function-call.terraform meta.interpolation.terraform variable.language.terraform +# ^ meta.function-call.terraform meta.interpolation.terraform punctuation.accessor.dot.terraform # ^^^^^^ meta.function-call.terraform meta.interpolation.terraform variable.other.member.terraform -# ^ meta.function-call.terraform meta.interpolation.terraform keyword.other.interpolation.end.terraform +# ^ meta.function-call.terraform meta.interpolation.terraform punctuation.section.interpolation.end.terraform # ^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform # ^ meta.function-call.terraform punctuation.section.parens.end.terraform @@ -2092,11 +2097,11 @@ # ^^^^^^^^^^^^ meta.function-call.terraform support.function.builtin.terraform # ^ meta.function-call.terraform punctuation.section.parens.begin.terraform # ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^^ meta.function-call.terraform meta.interpolation.terraform support.constant.terraform -# ^ meta.function-call.terraform meta.interpolation.terraform keyword.operator.accessor.terraform +# ^^ meta.function-call.terraform meta.interpolation.terraform punctuation.section.interpolation.begin.terraform +# ^^^^ meta.function-call.terraform meta.interpolation.terraform variable.language.terraform +# ^ meta.function-call.terraform meta.interpolation.terraform punctuation.accessor.dot.terraform # ^^^^^^ meta.function-call.terraform meta.interpolation.terraform variable.other.member.terraform -# ^ meta.function-call.terraform meta.interpolation.terraform keyword.other.interpolation.end.terraform +# ^ meta.function-call.terraform meta.interpolation.terraform punctuation.section.interpolation.end.terraform # ^^^^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform # ^ meta.function-call.terraform punctuation.separator.terraform # ^ meta.function-call.terraform meta.braces.terraform punctuation.section.braces.begin.terraform @@ -2133,7 +2138,7 @@ # ^ meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform # ^^^^^^^^^^^^^^^^^^^^^ meta.function-call.terraform string.quoted.double.terraform # ^ meta.function-call.terraform punctuation.section.parens.end.terraform - + timeadd("2017-11-22T00:00:00Z", "10m") # ^^^^^^^ meta.function-call.terraform support.function.builtin.terraform # ^ meta.function-call.terraform punctuation.section.parens.begin.terraform @@ -2238,7 +2243,7 @@ # ^ meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.end.terraform # ^ meta.function-call.terraform punctuation.section.parens.end.terraform # ^ -function - + md5("hello world") # ^^^ meta.function-call.terraform support.function.builtin.terraform # ^ meta.function-call.terraform punctuation.section.parens.begin.terraform @@ -2252,11 +2257,11 @@ # ^^^^^^^^^^ meta.function-call.terraform meta.function-call.terraform support.function.builtin.terraform # ^ meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.begin.terraform # ^ meta.function-call.terraform meta.function-call.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform -# ^^ meta.function-call.terraform meta.function-call.terraform meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^^ meta.function-call.terraform meta.function-call.terraform meta.interpolation.terraform support.constant.terraform -# ^ meta.function-call.terraform meta.function-call.terraform meta.interpolation.terraform keyword.operator.accessor.terraform +# ^^ meta.function-call.terraform meta.function-call.terraform meta.interpolation.terraform punctuation.section.interpolation.begin.terraform +# ^^^^ meta.function-call.terraform meta.function-call.terraform meta.interpolation.terraform variable.language.terraform +# ^ meta.function-call.terraform meta.function-call.terraform meta.interpolation.terraform punctuation.accessor.dot.terraform # ^^^^^^ meta.function-call.terraform meta.function-call.terraform meta.interpolation.terraform variable.other.member.terraform -# ^ meta.function-call.terraform meta.function-call.terraform meta.interpolation.terraform keyword.other.interpolation.end.terraform +# ^ meta.function-call.terraform meta.function-call.terraform meta.interpolation.terraform punctuation.section.interpolation.end.terraform # ^^^^^^^^^^^^ meta.function-call.terraform meta.function-call.terraform string.quoted.double.terraform # ^ meta.function-call.terraform meta.function-call.terraform punctuation.section.parens.end.terraform # ^ meta.function-call.terraform punctuation.separator.terraform @@ -2379,7 +2384,7 @@ # ^ meta.function-call.terraform punctuation.section.parens.begin.terraform # ^ meta.function-call.terraform constant.numeric.integer.terraform # ^ meta.function-call.terraform punctuation.section.parens.end.terraform - + toset(["a", "b", "c"]) # ^^^^^ meta.function-call.terraform support.function.builtin.terraform # ^ meta.function-call.terraform punctuation.section.parens.begin.terraform @@ -2412,13 +2417,13 @@ [for s in var.list : upper(s)] # ^ punctuation.section.brackets.begin.terraform -# ^^^ keyword.control.terraform +# ^^^ keyword.control.loop.for.terraform # ^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform -# ^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform +# ^^ keyword.control.loop.in.terraform +# ^^^ variable.language.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^ variable.other.member.terraform -# ^ keyword.operator.terraform +# ^ punctuation.section.block.loop.for.terraform # ^^^^^ meta.function-call.terraform support.function.builtin.terraform # ^ meta.function-call.terraform punctuation.section.parens.begin.terraform # ^ meta.function-call.terraform @@ -2431,15 +2436,15 @@ [for k, v in var.map : length(k) + length(v)] # ^ punctuation.section.brackets.begin.terraform -# ^^^ keyword.control.terraform +# ^^^ keyword.control.loop.for.terraform # ^ variable.other.readwrite.terraform # ^ punctuation.separator.terraform # ^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform -# ^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform +# ^^ keyword.control.loop.in.terraform +# ^^^ variable.language.terraform +# ^ punctuation.accessor.dot.terraform # ^^^ variable.other.member.terraform -# ^ keyword.operator.terraform +# ^ punctuation.section.block.loop.for.terraform # ^^^^^^ meta.function-call.terraform support.function.builtin.terraform # ^ meta.function-call.terraform punctuation.section.parens.begin.terraform # ^ meta.function-call.terraform @@ -2457,20 +2462,20 @@ [for o in var.list : o.interfaces[0].name] # ^ punctuation.section.brackets.begin.terraform -# ^^^ keyword.control.terraform +# ^^^ keyword.control.loop.for.terraform # ^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform -# ^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform +# ^^ keyword.control.loop.in.terraform +# ^^^ variable.language.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^ variable.other.member.terraform -# ^ keyword.operator.terraform +# ^ punctuation.section.block.loop.for.terraform # ^ variable.other.readwrite.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^^^^^ variable.other.member.terraform # ^ punctuation.section.brackets.begin.terraform # ^ constant.numeric.integer.terraform # ^ punctuation.section.brackets.end.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^ variable.other.member.terraform # ^ punctuation.section.brackets.end.terraform @@ -2480,21 +2485,21 @@ [for o in var.list : o.interfaces][0].name # ^ punctuation.section.brackets.begin.terraform -# ^^^ keyword.control.terraform +# ^^^ keyword.control.loop.for.terraform # ^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform -# ^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform +# ^^ keyword.control.loop.in.terraform +# ^^^ variable.language.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^ variable.other.member.terraform -# ^ keyword.operator.terraform +# ^ punctuation.section.block.loop.for.terraform # ^ variable.other.readwrite.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^^^^^ variable.other.member.terraform # ^ punctuation.section.brackets.end.terraform # ^ punctuation.section.brackets.begin.terraform # ^ constant.numeric.integer.terraform # ^ punctuation.section.brackets.end.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^ variable.other.member.terraform ///// @@ -2506,16 +2511,16 @@ # ^^ variable.declaration.terraform keyword.operator.assignment.terraform # ^ punctuation.section.brackets.begin.terraform for instance in aws_instance.ubuntu: -# ^^^ keyword.control.terraform +# ^^^ keyword.control.loop.for.terraform # ^^^^^^^^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform +# ^^ keyword.control.loop.in.terraform # ^^^^^^^^^^^^ variable.other.readwrite.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^ variable.other.member.terraform -# ^ keyword.operator.terraform +# ^ punctuation.section.block.loop.for.terraform instance.private_dns # ^^^^^^^^ variable.other.readwrite.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^^^^^^ variable.other.member.terraform ] # ^ punctuation.section.brackets.end.terraform @@ -2529,17 +2534,17 @@ # ^^ variable.declaration.terraform keyword.operator.assignment.terraform # ^ punctuation.section.brackets.begin.terraform for instance in aws_instance.ubuntu: -# ^^^ keyword.control.terraform +# ^^^ keyword.control.loop.for.terraform # ^^^^^^^^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform +# ^^ keyword.control.loop.in.terraform # ^^^^^^^^^^^^ variable.other.readwrite.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^ variable.other.member.terraform -# ^ keyword.operator.terraform +# ^ punctuation.section.block.loop.for.terraform (instance.public_ip != "" ? list(instance.private_ip, instance.public_ip) : list(instance.private_ip)) # ^ punctuation.section.parens.begin.terraform # ^^^^^^^^ variable.other.readwrite.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^^^^ variable.other.member.terraform # ^^ keyword.operator.terraform # ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform @@ -2548,20 +2553,20 @@ # ^^^^ meta.function-call.terraform support.function.builtin.terraform # ^ meta.function-call.terraform punctuation.section.parens.begin.terraform # ^^^^^^^^ meta.function-call.terraform -# ^ meta.function-call.terraform keyword.operator.accessor.terraform +# ^ meta.function-call.terraform punctuation.accessor.dot.terraform # ^^^^^^^^^^ meta.function-call.terraform variable.other.member.terraform # ^ meta.function-call.terraform punctuation.separator.terraform # ^^^^^^^^ meta.function-call.terraform -# ^ meta.function-call.terraform keyword.operator.accessor.terraform +# ^ meta.function-call.terraform punctuation.accessor.dot.terraform # ^^^^^^^^^ meta.function-call.terraform variable.other.member.terraform # ^ meta.function-call.terraform punctuation.section.parens.end.terraform # ^ keyword.operator.terraform # ^^^^ meta.function-call.terraform support.function.builtin.terraform # ^ meta.function-call.terraform punctuation.section.parens.begin.terraform # ^^^^^^^^ meta.function-call.terraform -# ^ meta.function-call.terraform keyword.operator.accessor.terraform +# ^ meta.function-call.terraform punctuation.accessor.dot.terraform # ^^^^^^^^^^ meta.function-call.terraform variable.other.member.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform +# ^ meta.function-call.terraform punctuation.section.parens.end.terraform # ^ punctuation.section.parens.end.terraform ] # ^ punctuation.section.brackets.end.terraform @@ -2573,37 +2578,37 @@ value = [ # ^^^^^ variable.declaration.terraform variable.other.readwrite.terraform # ^^ variable.declaration.terraform keyword.operator.assignment.terraform -# ^ punctuation.section.brackets.begin.terraform +# ^ punctuation.section.brackets.begin.terraform for instance in aws_instance.ubuntu: -# ^^^ keyword.control.terraform +# ^^^ keyword.control.loop.for.terraform # ^^^^^^^^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform +# ^^ keyword.control.loop.in.terraform # ^^^^^^^^^^^^ variable.other.readwrite.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^ variable.other.member.terraform -# ^ keyword.operator.terraform +# ^ punctuation.section.block.loop.for.terraform (instance.public_ip != "" ? [instance.private_ip, instance.public_ip] : [instance.private_ip]) # ^ punctuation.section.parens.begin.terraform # ^^^^^^^^ variable.other.readwrite.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^^^^ variable.other.member.terraform # ^^ keyword.operator.terraform # ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform # ^ string.quoted.double.terraform punctuation.definition.string.end.terraform # ^ keyword.operator.terraform # ^ punctuation.section.brackets.begin.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^^^^^ variable.other.member.terraform # ^ punctuation.separator.terraform -# ^ keyword.operator.accessor.terraform -# ^^^^^^^^^ variable.other.member.terraform +# ^ punctuation.accessor.dot.terraform +# ^^^^^^^^^ variable.other.member.terraform # ^ punctuation.section.brackets.end.terraform # ^ keyword.operator.terraform # ^ punctuation.section.brackets.begin.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^^^^^ variable.other.member.terraform -# ^ punctuation.section.brackets.end.terraform -# ^ punctuation.section.parens.end.terraform +# ^ punctuation.section.brackets.end.terraform +# ^ punctuation.section.parens.end.terraform ] # ^ punctuation.section.brackets.end.terraform @@ -2613,13 +2618,13 @@ [for s in var.list : upper(s) if s != ""] # ^ punctuation.section.brackets.begin.terraform -# ^^^ keyword.control.terraform +# ^^^ keyword.control.loop.for.terraform # ^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform -# ^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform +# ^^ keyword.control.loop.in.terraform +# ^^^ variable.language.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^ variable.other.member.terraform -# ^ keyword.operator.terraform +# ^ punctuation.section.block.loop.for.terraform # ^^^^^ meta.function-call.terraform support.function.builtin.terraform # ^ meta.function-call.terraform punctuation.section.parens.begin.terraform # ^ meta.function-call.terraform @@ -2637,11 +2642,11 @@ [for i, v in ["a", "b", "c"]: v if i < 2] # ^ punctuation.section.brackets.begin.terraform -# ^^^ keyword.control.terraform +# ^^^ keyword.control.loop.for.terraform # ^ variable.other.readwrite.terraform # ^ punctuation.separator.terraform # ^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform +# ^^ keyword.control.loop.in.terraform # ^ punctuation.section.brackets.begin.terraform # ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform # ^^ string.quoted.double.terraform @@ -2652,7 +2657,7 @@ # ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform # ^^ string.quoted.double.terraform # ^ punctuation.section.brackets.end.terraform -# ^ keyword.operator.terraform +# ^ punctuation.section.block.loop.for.terraform # ^ variable.other.readwrite.terraform # ^^ keyword.control.conditional.terraform # ^ variable.other.readwrite.terraform @@ -2670,11 +2675,11 @@ {for i, v in ["a", "b"]: v => i} # ^ meta.braces.terraform punctuation.section.braces.begin.terraform -# ^^^ meta.braces.terraform keyword.control.terraform +# ^^^ meta.braces.terraform keyword.control.loop.for.terraform # ^ variable.other.readwrite.terraform # ^ punctuation.separator.terraform # ^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform +# ^^ keyword.control.loop.in.terraform # ^ punctuation.section.brackets.begin.terraform # ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform # ^^ string.quoted.double.terraform @@ -2682,9 +2687,9 @@ # ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform # ^^ string.quoted.double.terraform # ^ punctuation.section.brackets.end.terraform -# ^ keyword.operator.terraform +# ^ punctuation.section.block.loop.for.terraform # ^ variable.other.readwrite.terraform -# ^^ storage.type.function.terraform +# ^^ punctuation.separator.key-value.terraform # ^ variable.other.readwrite.terraform # ^ punctuation.section.braces.end.terraform # ^ -meta @@ -2695,18 +2700,18 @@ {for i, v in ["a"]: v => i...} # ^ meta.braces.terraform punctuation.section.braces.begin.terraform -# ^^^ meta.braces.terraform keyword.control.terraform +# ^^^ meta.braces.terraform keyword.control.loop.for.terraform # ^ variable.other.readwrite.terraform # ^ punctuation.separator.terraform # ^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform +# ^^ keyword.control.loop.in.terraform # ^ punctuation.section.brackets.begin.terraform # ^ string.quoted.double.terraform punctuation.definition.string.begin.terraform # ^^ string.quoted.double.terraform # ^ punctuation.section.brackets.end.terraform -# ^ keyword.operator.terraform +# ^ punctuation.section.block.loop.for.terraform # ^ variable.other.readwrite.terraform -# ^^ storage.type.function.terraform +# ^^ punctuation.separator.key-value.terraform # ^ variable.other.readwrite.terraform # ^^^ keyword.operator.terraform # ^ punctuation.section.braces.end.terraform @@ -2717,13 +2722,13 @@ {for s in var.list : substr(s, 0, 1) => s... if s != ""} # ^ meta.braces.terraform punctuation.section.braces.begin.terraform -# ^^^ meta.braces.terraform keyword.control.terraform +# ^^^ meta.braces.terraform keyword.control.loop.for.terraform # ^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform -# ^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform +# ^^ keyword.control.loop.in.terraform +# ^^^ variable.language.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^ variable.other.member.terraform -# ^ keyword.operator.terraform +# ^ punctuation.section.block.loop.for.terraform # ^^^^^^ meta.function-call.terraform support.function.builtin.terraform # ^ meta.function-call.terraform punctuation.section.parens.begin.terraform # ^ meta.function-call.terraform @@ -2732,7 +2737,7 @@ # ^ meta.function-call.terraform punctuation.separator.terraform # ^ meta.function-call.terraform constant.numeric.integer.terraform # ^ meta.function-call.terraform punctuation.section.parens.end.terraform -# ^^ storage.type.function.terraform +# ^^ punctuation.separator.key-value.terraform # ^ variable.other.readwrite.terraform # ^^^ keyword.operator.terraform # ^^ keyword.control.conditional.terraform @@ -2751,20 +2756,20 @@ # ^^ variable.declaration.terraform keyword.operator.assignment.terraform # ^ meta.braces.terraform punctuation.section.braces.begin.terraform for l in var.letters: l => -# ^^^ meta.braces.terraform keyword.control.terraform +# ^^^ meta.braces.terraform keyword.control.loop.for.terraform # ^ variable.other.readwrite.terraform -# ^^ keyword.operator.word.terraform -# ^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform +# ^^ keyword.control.loop.in.terraform +# ^^^ variable.language.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^^ variable.other.member.terraform -# ^ keyword.operator.terraform +# ^ punctuation.section.block.loop.for.terraform # ^ variable.other.readwrite.terraform -# ^^ storage.type.function.terraform +# ^^ punctuation.separator.key-value.terraform upper(l) # ^^^^^ meta.function-call.terraform support.function.builtin.terraform # ^ meta.function-call.terraform punctuation.section.parens.begin.terraform # ^ meta.function-call.terraform -# ^ meta.function-call.terraform punctuation.section.parens.end.terraform +# ^ meta.function-call.terraform punctuation.section.parens.end.terraform } # ^ punctuation.section.braces.end.terraform @@ -2814,7 +2819,7 @@ ///// resource "aws_security_group" "example" { -# ^^^^^^^^ meta.type.terraform storage.type.terraform +# ^^^^^^^^ meta.type.terraform keyword.declaration.terraform # ^ meta.type.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform # ^^^^^^^^^^^^^^^^^^^ meta.type.terraform string.quoted.double.terraform # ^ meta.type.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform @@ -2825,7 +2830,7 @@ # ^^ meta.block.terraform variable.declaration.terraform keyword.operator.assignment.terraform # ^ meta.block.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform # ^^^^^^^^ meta.block.terraform string.quoted.double.terraform - + dynamic "ingress" { # ^^^^^^^ meta.block.terraform meta.type.terraform entity.name.type.terraform # ^ meta.block.terraform meta.type.terraform string.quoted.double.terraform punctuation.definition.string.begin.terraform @@ -2834,8 +2839,8 @@ for_each = var.service_ports # ^^^^^^^^ meta.block.terraform meta.block.terraform variable.declaration.terraform variable.other.readwrite.terraform # ^^ meta.block.terraform meta.block.terraform variable.declaration.terraform keyword.operator.assignment.terraform -# ^^^ meta.block.terraform meta.block.terraform support.constant.terraform -# ^ meta.block.terraform meta.block.terraform keyword.operator.accessor.terraform +# ^^^ meta.block.terraform meta.block.terraform variable.language.terraform +# ^ meta.block.terraform meta.block.terraform punctuation.accessor.dot.terraform # ^^^^^^^^^^^^^ meta.block.terraform meta.block.terraform variable.other.member.terraform content { # ^^^^^^^ meta.block.terraform meta.block.terraform meta.type.terraform entity.name.type.terraform @@ -2843,12 +2848,12 @@ from_port = ingress.value # ^^^^^^^^^ meta.block.terraform meta.block.terraform meta.block.terraform variable.declaration.terraform variable.other.readwrite.terraform # ^^ meta.block.terraform meta.block.terraform meta.block.terraform variable.declaration.terraform keyword.operator.assignment.terraform -# ^ meta.block.terraform meta.block.terraform meta.block.terraform keyword.operator.accessor.terraform +# ^ meta.block.terraform meta.block.terraform meta.block.terraform punctuation.accessor.dot.terraform # ^^^^^ meta.block.terraform meta.block.terraform meta.block.terraform variable.other.member.terraform to_port = ingress.value # ^^^^^^^ meta.block.terraform meta.block.terraform meta.block.terraform variable.declaration.terraform variable.other.readwrite.terraform # ^^ meta.block.terraform meta.block.terraform meta.block.terraform variable.declaration.terraform keyword.operator.assignment.terraform -# ^ meta.block.terraform meta.block.terraform meta.block.terraform keyword.operator.accessor.terraform +# ^ meta.block.terraform meta.block.terraform meta.block.terraform punctuation.accessor.dot.terraform protocol = "tcp" + "IP" # ^^^^^^^^ meta.block.terraform meta.block.terraform meta.block.terraform variable.declaration.terraform variable.other.readwrite.terraform # ^^ meta.block.terraform meta.block.terraform meta.block.terraform variable.declaration.terraform keyword.operator.assignment.terraform @@ -2908,37 +2913,37 @@ ///////////////////////////////////////////////////////////////////// var.something -# ^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform +# ^^^ variable.language.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^^^^ variable.other.member.terraform local.something -# ^^^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform +# ^^^^^ variable.language.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^^^^ variable.other.member.terraform module.name.output_name -# ^^^^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform +# ^^^^^^ variable.language.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^ variable.other.member.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^^^^^^ variable.other.member.terraform data.data_type.name -# ^^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform +# ^^^^ variable.language.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^^^^ variable.other.member.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^ variable.other.member.terraform path.module -# ^^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform +# ^^^^ variable.language.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^ variable.other.member.terraform terraform.workspace -# ^^^^^^^^^ support.constant.terraform -# ^ keyword.operator.accessor.terraform +# ^^^^^^^^^ variable.language.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^^^^ variable.other.member.terraform ///////////////////////////////////////////////////////////////////// @@ -2946,42 +2951,42 @@ ///////////////////////////////////////////////////////////////////// resource {} -# ^^^^^^^^ meta.type.terraform storage.type.terraform +# ^^^^^^^^ meta.type.terraform keyword.declaration.terraform # ^ meta.type.terraform meta.block.terraform punctuation.section.block.begin.terraform # ^ meta.block.terraform punctuation.section.block.end.terraform provider {} -# ^^^^^^^^ meta.type.terraform storage.type.terraform +# ^^^^^^^^ meta.type.terraform keyword.declaration.terraform # ^ meta.type.terraform meta.block.terraform punctuation.section.block.begin.terraform # ^ meta.block.terraform punctuation.section.block.end.terraform variable {} -# ^^^^^^^^ meta.type.terraform storage.type.terraform +# ^^^^^^^^ meta.type.terraform keyword.declaration.terraform # ^ meta.type.terraform meta.block.terraform punctuation.section.block.begin.terraform # ^ meta.block.terraform punctuation.section.block.end.terraform output {} -# ^^^^^^ meta.type.terraform storage.type.terraform +# ^^^^^^ meta.type.terraform keyword.declaration.terraform # ^ meta.type.terraform meta.block.terraform punctuation.section.block.begin.terraform # ^ meta.block.terraform punctuation.section.block.end.terraform locals {} -# ^^^^^^ meta.type.terraform storage.type.terraform +# ^^^^^^ meta.type.terraform keyword.declaration.terraform # ^ meta.type.terraform meta.block.terraform punctuation.section.block.begin.terraform # ^ meta.block.terraform punctuation.section.block.end.terraform module {} -# ^^^^^^ meta.type.terraform storage.type.terraform +# ^^^^^^ meta.type.terraform keyword.declaration.terraform # ^ meta.type.terraform meta.block.terraform punctuation.section.block.begin.terraform # ^ meta.block.terraform punctuation.section.block.end.terraform data {} -# ^^^^ meta.type.terraform storage.type.terraform +# ^^^^ meta.type.terraform keyword.declaration.terraform # ^ meta.type.terraform meta.block.terraform punctuation.section.block.begin.terraform # ^ meta.block.terraform punctuation.section.block.end.terraform terraform {} -# ^^^^^^^^^ meta.type.terraform storage.type.terraform +# ^^^^^^^^^ meta.type.terraform keyword.declaration.terraform # ^ meta.type.terraform meta.block.terraform punctuation.section.block.begin.terraform # ^ meta.block.terraform punctuation.section.block.end.terraform @@ -3037,13 +3042,16 @@ <<- END # ^^^ keyword.operator.heredoc.terraform # ^^^ keyword.control.heredoc.terraform - Hello, ${var.name} -# ^^^^^^^ string.unquoted.heredoc.terraform -# ^^ meta.interpolation.terraform keyword.other.interpolation.begin.terraform -# ^^^ meta.interpolation.terraform support.constant.terraform -# ^ meta.interpolation.terraform keyword.operator.accessor.terraform -# ^^^^ meta.interpolation.terraform variable.other.member.terraform -# ^ meta.interpolation.terraform keyword.other.interpolation.end.terraform + Hello, %{var.name} +#^^^^^^^^^^^^^^^^^^^^^ meta.string.terraform +#^^^^^^^^^^ string.unquoted.heredoc.terraform +# ^^^^^^^^^^^ meta.interpolation.terraform +# ^^ punctuation.section.interpolation.begin.terraform +# ^^^^^^^^ source.terraform +# ^^^ variable.language.terraform +# ^ punctuation.accessor.dot.terraform +# ^^^^ variable.other.member.terraform +# ^ punctuation.section.interpolation.end.terraform END # ^^^^ keyword.control.heredoc.terraform @@ -3059,7 +3067,7 @@ # ^^^^^^^^^ support.constant.terraform # ^^^^^^ keyword.control.import.terraform # ^^^^^^^^^^^^ entity.name.label.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^^^ variable.other.member.terraform # ^^^^^^^^^^ entity.name.label.terraform @@ -3071,7 +3079,6 @@ # ^^^^^^^^^ support.constant.terraform # ^^^^^^ keyword.control.import.terraform # ^^^^^^^^^^^^^^^^^^^^ entity.name.label.terraform -# ^ keyword.operator.accessor.terraform +# ^ punctuation.accessor.dot.terraform # ^^^^^ variable.other.member.terraform # ^^^^^^ constant.numeric.integer.terraform - \ No newline at end of file