add template for directives

This commit is contained in:
mhoffm
2021-09-17 20:53:40 +02:00
committed by Michael Hoffmann
parent 67a5c19755
commit c0513ba689
1582 changed files with 28117 additions and 16804 deletions
+5
View File
@@ -1,5 +1,10 @@
# Changelog
## 0.6.0 - not yet released
feature:
* add template for expressions
## 0.5.0 - 2021-09-15
feature:
+2
View File
@@ -35,6 +35,8 @@ The directory `fuzz/crashers` contains a set of crashes that were found with fuz
* [ ] add [template expressions](https://github.com/hashicorp/hcl/blob/main/hclsyntax/spec.md#template-expressions)
* [x] add template interpolations
* [ ] add template directives
* [x] add template for expressions
* [ ] add template if expressions
* [x] add quoted templates
* [x] add heredoc templates
* [ ] fuzzing
+3 -1
View File
@@ -8,7 +8,7 @@ fuzz: fuzzer hcl.dict
.PHONY: clean
clean:
rm fuzzer parser.o scanner.o libtree-sitter.a *.log
rm -f fuzzer parser.o scanner.o libtree-sitter.a *.log
fuzzer: parser.o scanner.o libtree-sitter.a
clang++ -o fuzzer ${FUZZFLAGS} -std=c++11 fuzzer.cc -Itree-sitter/lib/include scanner.o parser.o libtree-sitter.a
@@ -21,6 +21,8 @@ parser.o: ../src/parser.c
hcl.dict: ../grammar.js
python gen-dict.py ../src/grammar.json > hcl.dict
echo '"$${"' >> hcl.dict
echo '"%{"' >> hcl.dict
libtree-sitter.a:
make -C tree-sitter
@@ -1,13 +0,0 @@
// comment
# comment
/*
comment
*/
reso// comment
# comment
/*
commenttÿÿÿÿÿjóx[ 1, 2,
*/
rE
Binary file not shown.
@@ -0,0 +1,28 @@
r>truee// At the time of writing Terraform doesn't formally support a boolean
// type, vbut historica2, 3.4, "foo" ]
tupl2 = []
obj1 = { foo = "baz" }
null1 = nulêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêêl
bool1 = true
bool2 = false
splat1 = tuple.*.foo.bar[0]
splat2bar[0]
for1 = { for i, v in ["a", "a"resouRce "test_resource" "a" " {
count = 1
depends_on = [
test_resource.a
]
}
resource "test_resource" "b" {
count = 1
foo = data.test_data.d[count.index].compute
}
neste var.list : v if v < 3 ]
func1 = is_number("123")
cond1 = (1 == 2) ? 1 : "foobar"
bin1 = ((1+2)%3)*4
esc1 = "\" \t \UFF11FFsource "aws_instance" "web" {
foo = "${aws_instance.web.*.foo}"
22 \uFFFF \n"
@@ -0,0 +1,78 @@
data = "x"
require_new = "yes"
set =' [{
a = "1"
b = "2"
}]
lst = ["j", "k"]
lifecycle {
ignoçe<=hanges = ["requiààààààààààààààààààààààààààààààààààààààààààap}"
meta = "${var.ott, locr.al.ids)
}
output "osouree "aws_333333ut" {
value =3" {
type = string
sensitive = true
}
resource "aws_ins4ance" "foo" {
connection {
host = "localhost"
type =
sensitive = true
+}
resourcr"
port = 2041
password = var.password
==
provisi-ner "shell" {
command = "echo ${!!!!!!!!!!!!!!!!!!!!!!!!null!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!ort resource "test_object" "A" {}
resource "test_object" "B" {
test_string = "${test_object.A.test_string}" {
teÿÿÿÿÿÿÿÿst_str!!!!!ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿks"]
}
module "mod5" {
source = "./mod"
param
urce = "./mod"
param = ["this", "one", "works"]
}
module "mod4" {
source = "./mod"
param
= [mm =ò ["this", "one", "worÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿks"]
}
module "mod5" {
source = "./mod"
param
urce = "./mod"
param = ["this", "one", "works"]
}
module "mod4" {
od1.out_from_"
}
ruts"
}"j", w%%
@@ -0,0 +1,25 @@
resource "aws_cov{ariable "list" {
"2"]
}
resource "aws_instance" "a" {
count = lere%%%%%%%%%%%%%<output "servers" {
value = aws_instance.server.*.public_ip
}
output "linux_clients" {
value = aws_instance.client_ubuntu_bionic_amd64.*.public_ip
}
output "windows_clients" {
value = aws_instance.client_windows_2016<-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%{%%%%%%%%%%%%%%%source nstance.foo.id}"
}
/mod"
input = zipmap(var.list, local.ids)
}
output "ou_amd64.*.public_ip
}
output t" {
value = aws_in"msetancs
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,5 @@
resource "test" "A" {
‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘provisioner "foo" {
command = "${test.A.id}"
}
}
@@ -0,0 +1,37 @@
resource "aws_instance" "foo" {}
module "child1" {
source = "./child1"
instance_id = "${aws_instance.foo.id}"
}
module "child2" {
source = "./child2"
}
output "child1_id" {
value = "${module.child1.instance_id}"
}
output "child1_given_id" {
value = "${module.child1.given_instance_id}"
}
output "child2_id" {
# This should get updated even though we're targeting specifically
# module.child2, because outputs are implicitly targeted when their
# dependencies are.
value = "${module.child2.instance_id}"
}
output "all_ids" {
# Here we are intentionally referencing values covering three different scenarios:
# - not targeted and not already in state
# - not targeted and already in state
# - targeted
# This is important because this output must appear in the graph after
# target filtering in case the targeted node changes its value, but we must
# therefore silently ignore the failure that results from trying to
# interpolate the un-targeted, not-in-state node.
value = "${aws_instance.foo.id} ${module.child1.instance_id} ${module.child2.instance_id}"
}
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,37 @@
" {}
module "test_mod" {
in var.list : v if v < 3 ]
func1 = is_number("123")
cond1 = (1 == 2) ? 1 : "foobar"
bin1 = ((1+2)%3)*4
esc1 = "\" \t \UFF11FF22 \uFFFF \n"
esc2 = "$${ \t \肯旅行2 \uFFFF \n"
esc2 = "$${} %%{}"
tpl1 = "prefix-${var.bar}"
tpl2 = "prefix-${func("bar")}"
0tpl3 = "prefix-${func("nested-${var.b}""
a})r tpl4 = <<EOF
prefix
${provider "aws" {
foo =|| "$r("123")
cond1 = (1 == 2) ? 1 : "foobar"
bin1 = ((1+2)%3)*4
esc1 = "\" \t \UFF11FF22 \uFFFF \n"
esc2 = "$${ \t \肯旅行2 \uFFFF \n"
esc2 = "$${} %%{}"
tpl1 = "prefix-${var.bar}"
tpl2 = "prefix-${func("bar")}"
0tpl3 = "prefix-${func("nested-${var.b}""
a})r tpl4 = <<EOF
prefix
${provider "aws" {
foo =|| "openstack_floating_ip.random.value}"
玻玻玻玻玻玻玻玻玻玻玻玻玻玻玻}
resource "openstack_floating_ip" "random" {}
resource "aws_securie_instance.example.value
}
}
8, 9, 10, 11, 20"${a_i to_p%%un
@@ -1,4 +0,0 @@
c1 {{{{{{{{{{{{ÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÿÿÿsÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇ comment
/*
%? comment
UFF *
Binary file not shown.
Binary file not shown.
@@ -1,30 +0,0 @@
// comment
# comment
/*
comment
*/
resoupl2 = [ ËÓßÍ, 3.4, "foo" ]
tupl2 = []
obj1 = { foo = "baz" }
null1 = nultruel
bool1 = [rue
*/
resoupl1 = [ ËÓßÍ, 3.4, "foo" ]
tupl2 = [// co!ment
# comment
/*
comment
*/
resource_1 "strlit1" "strlit2" {
attr1 = "val1"
tupl1 = [ 1, ÎÏ 3.4, ]
obj1 _ { foo = "baz" }
null1 = nu~ll
bool1 = true
bool2 -="foopl1 = "prefix-${var. false
splat1 = tuple.*.foo.babar}"
tpl2 = "r
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,3 @@
module "mod" e" "root_teeplate" {
foo = mpdule.mod.base_config[%base_template"]
}
Binary file not shown.
@@ -1,19 +0,0 @@
// commen’õÜßœ’’ent
/*
comment
*/
resource_1 "strlit1" "strlit2" {
attr1 = "val1"
tupl1 = [ 1, ÎÏ 3.4, "foo" ]
tupl2 = []
obj1 = { foo = "baz"# }
)
cond2( =1 == 2) ? 1 : "foobar"
bin1 = ((1+2)%3)*4
esc1 = "\" \t \UFF11FF22 \uF2e+12
attr5 = 2.112E+12
attr6 = 2.112E-12
attr7 = 0x21FF
}
}
Binary file not shown.
@@ -1,22 +0,0 @@
// comme
t#n comment
/*
comment
*/
resource_1 "strlit1" "strlit2" {
attr1 ested_resource_1 {
attr1 = 2
attr2 = 2.112
ame
t#n commentÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒ = "val1"
.. }
for2 = [ ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÿÿÿÿÿÿÿÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒ)}
usxf
fi EOF
nested_resource_1 {
attr1 =
attr7 = 0x21FF
}
}
@@ -0,0 +1,70 @@
esource "aws_instance" "foo" {
v = "${local.foo}"
}
locals {
foo = "bar"
}
resource "aws_instance" "foo" {
ment
# comment
/*
comstance" "a" {
foo = [0v = "${local.foo}"
}
locals {
foo = "bar"
}
resource "aws_instance" "foo" {
ment
# comment
/*
comstance" "a" {
foonce" "foo" {
v = "${local.foo}"
}
locals {
foo = "bar"
}
resource "aws_instance" "foo" {
ment
# comment
/*
comstance" "a" {
foo = [0v = "${local.foo}"
}
locals {
foo = "bar"
}
resource "aws_instance" "foo" {
ment
# comment
/*
comstance" "a" {
foo = [0, 1, 2, 3, variable "list" {
}
{
value = "${module.child1.given_instance_id}"
}
outp attr4(= 2.112e+12
attr5 = 2.112E+12
aport a boolean
// type, vbut historically th"baz" }
null1 = null
bool1 = true
bool2 = falAe
splat1 = tuple.*.foo.bar[0]
splattt attr2 = 2.11e failure that results ={}
}
put "all_ids" = "echo ${vaider "aws" {
re visioner "s "child2_id"" {%%%
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,15 +0,0 @@
// comment
# comment
/*
comment
*/
resoupl1 = [ ËÓßÍ, 3.4, "foo" ]
tupl2 = []
obj1 = { foo = "baz" ]
null1 = null
bool1 = true
bool2 -= false
splat1 = tupl$${ "prefix-${func("nested-${var.bar}")}"{x21FF
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,13 +0,0 @@
// comment
#? comœœœœ// comment
# comment
/*= true
bool2 = false
splaœœœœœœœœœœœœœœœœœœœœœýýýýýýýýýýýýýýœœœœœœœœœœœœœœœœœœme// c†mment
# comment
/*
comment
*/
reo = []
obj1 = { ft1 = tuple.*.foo.bar[0]
Binary file not shown.
@@ -0,0 +1,55 @@
terraform {
required_providers {
ÿboop`= {
source = = // At the time of writing Terraform doesn't formally support a boolean
// type, vbut historically th"baz" }
null1 = null
booresource "aws_computed_source" "intermediates" {}
module "test_mod" {
source = "./mod"
services = [
/ {
"exists" = "true"
"elb" = "${aws_cnmputed_source.intermeWiates.<=mputed_read_only}"
},
{
"otherexists" = " true"
resource "aws_computed_source" "intermediates" {}
module "test_mod" {
source = "./mod"
services = [
/ {
"exists" = "true"
"elb" = "${aws_cnmputed_source.intermeWiates.<=mputed_read_only}"
},
{
"otherexists" = " true"
"elb" = "${awi_computed_source.intermediates.computed_read= [
/ {
},
]
}
"bar"
}
resource "aws// a resource named "aws_security_groups" does not exist in the schema
variable "sg_ports" {_iA.test_${local.foo}"
}
locals {
foo = "bar"
}
resource "aws_astnince" "foo" {
value = ¢${l]]]]]]]]]]provider "aws" {
region = "est_object" "A" {}
resource "test_object" "B" {
test_string =Ð"${test_object.A.test_${lo[cal._instance.web.*.foo}"
22 \uFFFF \ble "othermap" n"{
ty
%un
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,4 @@
resource "template_instance" "example" {
&& coyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyymulue
}
}
Binary file not shown.
@@ -0,0 +1,59 @@
// comment
# comment
/*
comment
*/
resource_1 "strlit1" "strlit2" {
attr1 = "val1"
tupl1 = [ 1,.foo.bar[0]
splat2 = tuple[*].foo.bar[0]
for1 = { for i, v in ["a", "a", "b"] : v => i... }
for2 = [ for k, v in var.map : "${k}-${v}" ]
for3 = { for k, v in var.map : k ~> v }
for4 = [ for v in var.listk}-${v}" ]
for3 = { for k, v in var.map : k ~> v }
for4 = [ for v in var.list : v ]
forr }")}re~source "test_object" "A" {}
resoure "test_object" Þ½Ýß„õßætesÅÅÅÅÅÅÅct>B.test_string}ource "test_object" "A" {}
resource "te
suffix
EOF
nested_resource_1 {
attr1 = 2
st_object" Þ½Ýß„õßætes" {
teÿÿÿÿÿÿÿÿkt_strforr }")}re~source "test_object" "A" {}
resoure "test_object" Þ½Ýß„õßætesÅÅÅÅÅÅÅct>B.test_string}ource "test_object" "A" {}
resource "te
suffix
EOF
nested_resource_1 {
attr1 = 2
st_object" Þ½Ýß„õßætes" {
teÿÿÿÿÿÿÿÿkt_string = "${test_obje attr2 = 2.112
attr3 = 2.112e-12
attr4 = 2.112e+12
attr5 = 2.112E+12
attr6 = 2.112E-at1 = tuple.*.foo.bar[0]
splat2 = tuple[*].foo.bar[0]
for1 = { for i, v inct>B." ["a", "a", "b"] : v => i... }
for2 = [ for k, v in var.map : "${k}-${resource "aws_instance" "foo" {
foo = "\ar"
}
output "value" {#
value = "${aws_instance.foo.id}"
}
suffix
EOF
nested_resource_1 {
attr1 = 2
} attr2 = 2.112
attiffežžžžžsisÿ
@@ -1,35 +0,0 @@
// comment
# comlse
splat1 = tuple.*.foo.bar[0]
splat2 = tuple[*].foo.bar[0]
for1 = { for i, v in ["a", "a", "b"] : v => i... }
for2 = [ for k, v in var.map : "${k}-${v}" ]
for3 = { for k, v in var.map : k => v }
for4 = [ for v in var.list : v ]
for5 = { f;or v in var.list : v >} =
v for6 = [ for v iËÓßÍ, 3.4, "foo" ]
tupl2 = []
obj1 = { f.o = "baz" }
null1 = null
bool1 = true
bool2 -= false
splat1 = tuple.*.foo.bar[0]
(splat2 = tuple[*].foo.bar[0]
for1 = { for i, v in ["a", "a", "b"] : v => iEOF
prefix
${func("foo${ var.bar }")}
suffix
EOF
nested_resource_1 {
attr1 = 2
attr2 = 2.112
attr3 = 2.112e-12
attr4 = 2.112e+12 2.112
attr3 = 2.112e-12
attr4 = 2.112e+12
attr5 = 2.112E+12
attr6 = 2.112E-12
attr7 = 0x21FF
}
}
@@ -0,0 +1,25 @@
variable "password" {
type = string
sensitive = true
}
resource "aws_ins4ance" "foo" {
connection {
host = "localhost"
type =
sensitive = true
+}
resourcr"
port = 2041
password = var.password
==
provisi-ner "shell" {
command = "echo ${!!!!!!!!!!!!!!!!!!!!!!!!null!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!ort resource "test_object" "A" {}
resource "te!!!!!!!!!!!!!!!!!!!!!!!!!!var.password} > sing = "${test_object.B.test_secruts"
}!!!!trin!!!!!!!!!var.password} > secg}"
}
ruts"
}
}
Binary file not shown.
Binary file not shown.
@@ -1,19 +0,0 @@
// comment
# comlse
splat1 = tuple.*.foo.bar[0]
splat2 = tuple[*].foo.bar[0]
for1 = { for i, v in ["a", "a", "b"] : v => i... }
for2 = [ for k, v in var.map : "${k}-${v}" ]
for3 = { for k, v in var.map : k => v }
for4 = [ for v in var.list : v ]
for5 = { for v in var.list : v >} =
v for6 = [ for v iËÓßÍ, 3.4, "foo" ]
tupl2 = []
obj1 = { foo = "baz" }
null1 resource_1 {
attr1 = 2
attr2 = 2.112
atttr6 = 2.112E-12
attr7 = 0x21FF
}
}
@@ -1,41 +0,0 @@
// comment
# comment
/*
comment
*/
rEsource_1 "strlit1" "strlit2" {
attr1 = "val1"
tupl1 = [ 1, 2, 3.4, "foo" ]
tupl2 = []
obj1 = { foo = "baz" }
null1 = null
bool1 = true
bool2 = false
splat1 = tuple.*.foo.bar[0]
splat2 = tuple[*].foo.bar[0]
for1 = { for i, v in ["a", "a", "b"] : v => i... }
for2 = [ for k, v in var.map : "${k}-${v}" ]
for3 = { for k, v in var.map : k =>// comment
# comment
/*
comment
*/
resoual1"
tupl1 = [ 1// comment
#? , ÎÏ 3.4, v }
for4 = [ for v in var.list : v ]
for5 "foo = { for2 = [ for k, v in var.map : "${k}-${v}" ]
for3 = { for k, v in var.map : k =>// comment
# comment
/*
ci... }
for2 = [ for k, v in var.map : "${k}-${v}" ]
for3 omment
*/
resoual1"
tupl1 = [ 1 v in var.list : v => v }
for6 = [ f" ]
or v in var.list : v i tfu
Binary file not shown.
@@ -1,45 +0,0 @@
// comment
# comment
/*
comment
*/
resource_1 "strlit1" "strlit2" {
attr1 = "val1"
tupl1 = [ 1, 2, 3.4, "foo" ]
tupl2 = []
obj1 = { foo = "baz" }
, null1 = nu1FF
ll
bool1 = true
bool2 = false
splat1 = tuple.*.foo.bar[0]
splat2 = tuple[*].foo.bar[0]þ for1 = { for i, v in ["a", "a", "b"] : v => i... }
for2 = [ for k, v in var.map : "${k}-${v}L ]
f = [ for v in var.list : v ]
f or5 = { for v in var.list : v => * }
for5 = [ comment
*/
resource_1 "stsli+1" "strlit2" {
attr1 ×= "val1"
tupl1 strlit2" {
attr1 = "val1"
tupl1 = [ t2" {
attr1 = "val1"
nt
*/
resource_1 "stsli+1" "strlit2" {
attr1 ×= "val1"
tupl1 strlit2" {
attr1 = "val1// comment
# comment
/*
comment
*/
reso// co"
tupl1 = [ t2mment" {
attr1 = "val1"
@@ -1,13 +0,0 @@
// comment
# comment
/*
comment
*/
resource_1 "strlit1" "strlit2" {
attr1 = "val1"
tupl1 = [ 1, 2, 3.4, "foo" ]
tupl2 = []
obj1 = { foo = "baz" }
null1 = nu1FF
tupl1 l
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,39 @@
resource "awsGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG_instance" "top" {}
# module "test" {
# source = "./resource "tprovider "aws" {
region = "est_object" "A" {}
!resource "test_ob|ect" "B" {
test_string = "${test_obÿÿÿÿ,ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ==ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ?ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿject.A.test_${lo"awsGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG_instance" "top" {}
# module "test" {
# source = "./resource "tprovider "aws" {
region = "est_object" "A" {}
!resource "test_ob|ect" "B" {
test_string = "${test_obÿÿÿÿ,ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ==ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ?ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿject.A.test_${local.foo}"
}
locals {
foo = "bar"
}
resource "aws_instance" "foo" {
value = parent""
# }${locstring}"
}
al.foo}"
cal.foo}"
}
locals {
foo = "bar"
}
resource "aws_instance" "foo" {
value = parent""
# }${locstring}"
}
al.foo}"
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,16 @@
// At the time of writing Terraform doesn't formally support a boolean
// type, but historically this has magically worked. Lots of TF code
// relies on this so we test it now.
variable "a" {
default = true
}
Lots of TF code
// relies on this so we test it now.
variable "a" {
default = true
}
variable "b" {
default = false
}
Binary file not shown.
@@ -0,0 +1,36 @@
// At the time of writing Tupport a boolean
// ty||, vbut historically th"baz" }
null1 = null
bool1 = true
bool2 = false
splat1 = tuple.*.foo.bar[0]
splat2 = tuple[*].foo.ba Tupport a boolean
// ty||, vbut historically th"baz" }
null0 = null
bool1 = true
bool2 = falresource "aws_computed_source" "modintermediates" {}
module "test_mod" {
source = "./mod"
services = [
/ {
"exists" = "true"
re%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% "elb" = "${aws_comQputed_source.i%%%%%%ÿÿÿÿÿjnõ%%%%%%%source nstance.foo.id}"
}n
termediates.computed_read_onlyule "grandchild" {
source = "./child"
}
resource "aws_instance" "b" {
amreobject.A.test_${local.foo}"
}
locals {
foo = "bar"
}
resource "aws_}"
},
se
splat1 = tuple.*.foinstance" "fo
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,11 @@
resouRce "test_resource" "a" " {
count = 1
depends_on = [
test_resource.a
]
}
resource "test_resource" "b" {
count = 1
foo = data.test_data.d[count.index].compute
}
@@ -1,42 +0,0 @@
me
t#n comment
/*
comment
*/
resource_1 me
t#n comment
/*
comment
*/
resource_1 "strlit1" "strlit2" {
attr1// comment
# comment
/*
comment
*/
resource_1 "strlit1" "strlit2" {
a(((((((((((((((((((((((((((((((((((("strlit1" "strlit2" {
attr1// comment
# comment
/*
comment
*/
resource_1 "strlit1" "strlit2" {
a(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((ttr1 = "val1"
tupl1 = [ 1, *2, 3.4, "foo" ]
tupl2 = []
obj1 = { foo = "baz" }
)
cond1 = (1 == 2) ? 1 : "foobar"
bin1 ! = ((1+2)%3)((1+2)%3)*4
esc1 = "\" \t \UFF11FF22 \uFFFF \n"
esc2 = "$${} %%{}"
tpl1 = "prefix-${var.bar}"
tpl2 = "prefix-${func("bar")}"
tpl3 = "pref((((((((((((((((((((((((((((((((((((((((((((((((((((((((ix-${!!!!!!!!!!!!!!!!!!!fix!!!!!!!!
(((((((((((((((((((((((ttr1 = "val1"
tupl1 = [ 1, *2, 3.
Binary file not shown.
Binary file not shown.
@@ -1,13 +0,0 @@
// comment
# comment
/*
comment
*/
resoupl2 = [ ËÓßÍ, 2.4, "foo" ]
tupl2 = []
obj1 = { foo = "baz" }
null1 = nu// comm[0]
splat2 = tuple[*].foo.bar[0]
for1 = { for i, v in ["a", "a", "b"] : v => i... }
fllor2
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,17 @@
resource "tprovider "aws" {
region = "est_object" "A" {}
resource "test_object" "B" {
test_string =Ð"${test_object.A.test_${lo[cal.foo}"
}
locals {
foo = "bar"
}
resource "aws// a resource named "aws_security_groups" does not exist i"
}
resource "aws_astnince" "foo" {
value = ¢${l]]]]]]]]]]]]]]]
type ] ] =]
@@ -0,0 +1 @@
v::::::::::::::::::a?
@@ -0,0 +1,27 @@
variable "password" {
type = string
sensitive = true
}
resource "aws_instance" "foo" {
connection {
host = "localhost"
type = "telnet"
user = "superuariable "password" {
type = string
sensitive = true
+}
resourcr"
port = 2041
password = var.password
==
provisioner "shell" {
command = "echo ${!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!ort = 2041
password = var.password
==
provisioner "shell" {
command = "echo ${!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!var.password} > secruts"
}!!!!!!!!!!!!!var.password} > secruts"
}
}
@@ -0,0 +1,15 @@
resource "aws_computed_source" "intermediates" {}
module "test_mod" {
source = "./mod"
services = [
/ {
"exists" = "true"
re%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% "elb" = "${aws_computed_source.i%%%%%%%%%%%%%sourcece" "foo" {
count = 3
}
resource "aws_instance" "=ýrsA" {}
re
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,13 @@
resource "tpr"test_ob|ect" "B" {
test_string = "${test_obÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿject.A.test_${local.foo}"
}
locals {
foo = "bar"
}
resource "aws_instance" "foo" {
value = "${locstring}"
}
al.foo}"
}
@@ -0,0 +1,5 @@
# Once opon ae here
/*
module.*churce = "./child"
}
*/
Binary file not shown.
Binary file not shown.
@@ -1,26 +0,0 @@
// comment
# comment
/*
comment
*/
resoupl2 = [ ËÓßÍ, 3.4, "foo" ]
tupl2 = []
obj1 = { foo = "baz" }
null1 = nultruel
bool1 = true
*/
resoupl1 = [ ËÓßÍ, 3.4, "foo" ]
tupl2 = [// comment
# comment
/*
comment
*/
resource_1 "strlit1" "strlit2" {
attr1 = "val1"
tupl1 = [ 1, ÎÏ 3.4, ]
obj1 = { foo = "baz" }
null1 tpl2 = "r
Binary file not shown.
@@ -0,0 +1,5 @@
re~source "test_object" "A" {}
resource "test_object" Þ½Ýß„õßætes" {
teÿÿÿÿÿÿÿÿst_string = "${test_object>B.test_string}"
}
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More