File tree Expand file tree Collapse file tree 3 files changed +25
-2
lines changed
main/java/org/opengrok/indexer/analysis
java/org/opengrok/indexer/analysis
resources/sources/terraform Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -455,8 +455,8 @@ private void addTerraformSupport(List<String> command) {
455
455
*/
456
456
command .add ("--kinddef-terraform=s,struct,Resource\\ names" );
457
457
command .add ("--regex-terraform=" +
458
- "/[[:< :]]resource[[:space:]]*\" ([[:alpha:]][-_[:alpha:]]*)\" [[:space:]]*" +
459
- "\" ([[:alpha:]][-_[:alpha:]]*)\" [[:space:]]*\\ {/" +
458
+ "/^ [[:space :]]* resource[[:space:]]*\\ \ " ([[:alpha:]][-_[:alpha:]]*)\\ \" [[:space:]]*" +
459
+ "\\ \ " ([[:alpha:]][-_[:alpha:]]*)\\ \" [[:space:]]*\\ {/" +
460
460
"\\ 1.\\ 2/s/" );
461
461
}
462
462
Original file line number Diff line number Diff line change 30
30
import org .junit .jupiter .api .Test ;
31
31
import org .opengrok .indexer .util .TestRepository ;
32
32
33
+ import static org .junit .jupiter .api .Assertions .assertAll ;
33
34
import static org .junit .jupiter .api .Assertions .assertEquals ;
34
35
import static org .junit .jupiter .api .Assertions .assertTrue ;
35
36
@@ -136,4 +137,13 @@ void bug19195() throws Exception {
136
137
}
137
138
assertEquals (names .length , count , "function count" );
138
139
}
140
+
141
+ @ Test
142
+ void testTfTags () throws Exception {
143
+ var defs = getDefs ("terraform/test.tf" );
144
+ assertAll (
145
+ () -> assertEquals (1 , defs .getTags ().size ()),
146
+ () -> assertEquals ("oci_core_vcn.test_vcn" , defs .getTags ().get (0 ).symbol )
147
+ );
148
+ }
139
149
}
Original file line number Diff line number Diff line change
1
+ resource "oci_core_vcn" "test_vcn" {
2
+ # Required
3
+ compartment_id = var. compartment_id
4
+
5
+ # Optional
6
+ cidr_block = var. vcn_cidr_block
7
+ cidr_blocks = var. vcn_cidr_blocks
8
+ defined_tags = {" Operations.CostCenter" = " 42" }
9
+ display_name = var. vcn_display_name
10
+ dns_label = var. vcn_dns_label
11
+ freeform_tags = {" Department" = " Finance" }
12
+ is_ipv6enabled = var. vcn_is_ipv6enabled
13
+ }
You can’t perform that action at this time.
0 commit comments