File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,23 @@ patterns:
118118 2 : { name: keyword.operator.assignment.tf }
119119 - include : " #definition-right"
120120
121+ - name : " meta.import.tf"
122+ begin : ' \b(import)([\w\-\"$])?(?:\s+)?({)'
123+ beginCaptures :
124+ 1 : { name: keyword.declaration.$1.tf }
125+ 2 : { name: invalid.illegal.keyword.$1.tf }
126+ 3 : { name: punctuation.declaration.block.begin.tf }
127+ end : " }"
128+ endCaptures :
129+ 0 : { name: punctuation.declaration.block.end.tf }
130+ patterns :
131+ - match : ' \b([\-\w]+)(?:\s+)?(=)(?!=|>|<)'
132+ captures :
133+ 1 : { name: variable.other.readwrite.tf }
134+ 2 : { name: keyword.operator.assignment.tf }
135+ - include : " #definition-right"
136+
137+
121138 - name : " meta.module.tf"
122139 begin : ' \b(module)([\w\-\"$])?(?:\s+)?(")?([^\"\n]+)?(")?(?:\s+)?({)'
123140 beginCaptures :
Original file line number Diff line number Diff line change @@ -51,6 +51,16 @@ Moved block:
5151 to = "${2:new}"
5252 }
5353
54+ Import block :
55+ scope : source.tf
56+ prefix : import
57+ description : Used to import existing resources into Terraform state.
58+ body : |
59+ import {
60+ to = ${1:resource}
61+ id = "${2:resource_id}"
62+ }
63+
5464Variable :
5565 scope : source.tf
5666 prefix : variable
You can’t perform that action at this time.
0 commit comments