move fuzzing stuff to dedicated repository

This commit is contained in:
mhoffm
2021-09-19 12:21:37 +02:00
committed by Michael Hoffmann
parent c0513ba689
commit b048a42c6d
1094 changed files with 6 additions and 10517 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: acceptance
on: [push, pull_request]
on: [pull_request]
jobs:
unittests:
+1 -1
View File
@@ -1,6 +1,6 @@
name: build
on: [push, pull_request]
on: [pull_request]
jobs:
compile:
-3
View File
@@ -1,3 +0,0 @@
[submodule "fuzz/tree-sitter"]
path = fuzz/tree-sitter
url = https://github.com/tree-sitter/tree-sitter.git
+3
View File
@@ -5,6 +5,9 @@
feature:
* add template for expressions
cleanup:
* move fuzzing instrumentation to different repository
## 0.5.0 - 2021-09-15
feature:
+1 -5
View File
@@ -28,7 +28,7 @@ Total parses: 1892; successful parses: 1892; failed parses: 0; success percentag
## Fuzzing
The directory `fuzz/crashers` contains a set of crashes that were found with fuzzing.
See the [fuzzing repo for this parser](https://github.com/MichaHoffmann/tree-sitter-hcl-fuzz)
## Todo
@@ -39,10 +39,6 @@ The directory `fuzz/crashers` contains a set of crashes that were found with fuz
* [ ] add template if expressions
* [x] add quoted templates
* [x] add heredoc templates
* [ ] fuzzing
* [x] start with fuzzing the parser
* [x] upload fuzzing instrumentation
* [ ] document fuzzing process
* [ ] quality
* [x] add CI job that ensures the parser builds on different plattforms
* [ ] add CI job that parses crashers that were found during fuzzing
-30
View File
@@ -1,30 +0,0 @@
FUZZFLAGS=-fsanitize=fuzzer,address,undefined
WORKERS=4
.PHONY: fuzz
fuzz: fuzzer hcl.dict
UBSAN="print_stacktrace=1:halt_on_error=1:symbolize=1" ASAN_OPTIONS="quarantine_size_mb=10:detect_leaks=1:symbolize=1" ./fuzzer -workers=${WORKERS} -dict=hcl.dict corpus/
.PHONY: clean
clean:
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
scanner.o: ../src/scanner.cc
clang++ -o scanner.o ${FUZZFLAGS} -std=c++11 -I../src -c ../src/scanner.cc
parser.o: ../src/parser.c
clang -o parser.o ${FUZZFLAGS} -std=c99 -I../src -c ../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
cp tree-sitter/libtree-sitter.a .
@@ -1,28 +0,0 @@
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"
@@ -1,78 +0,0 @@
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%%
@@ -1,25 +0,0 @@
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.
@@ -1,5 +0,0 @@
resource "test" "A" {
‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘provisioner "foo" {
command = "${test.A.id}"
}
}
@@ -1,37 +0,0 @@
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.
@@ -1,37 +0,0 @@
" {}
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
Binary file not shown.
Binary file not shown.
@@ -1,3 +0,0 @@
module "mod" e" "root_teeplate" {
foo = mpdule.mod.base_config[%base_template"]
}
Binary file not shown.
Binary file not shown.
@@ -1,70 +0,0 @@
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,55 +0,0 @@
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
@@ -1,4 +0,0 @@
resource "template_instance" "example" {
&& coyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyymulue
}
}
@@ -1,59 +0,0 @@
// 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,25 +0,0 @@
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,39 +0,0 @@
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.
@@ -1,16 +0,0 @@
// 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
}
@@ -1,36 +0,0 @@
// 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.
@@ -1,11 +0,0 @@
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
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,17 +0,0 @@
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 ] ] =]
@@ -1 +0,0 @@
v::::::::::::::::::a?
@@ -1,27 +0,0 @@
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"
}
}
@@ -1,15 +0,0 @@
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.
@@ -1,13 +0,0 @@
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}"
}
@@ -1,5 +0,0 @@
# Once opon ae here
/*
module.*churce = "./child"
}
*/
Binary file not shown.
@@ -1,5 +0,0 @@
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.
@@ -1,40 +0,0 @@
variable "password" {
type = string
sensitive = true
}
resource "aws_ins4ance" "foo" {
connection {ng
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!!!!!!!
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_secr
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,20 +0,0 @@
# expressions with variable reference
variable "foo" {
type = string
}
resource "aws_instance" "foo" {
for_each = toset(
[for i in range(0,3) : sha1("${i}${var.foo}")]
)
foo = "foo"
}
# referencing another resource, which means it has soresource "aws_instance" "foo" {
user_data = "x"
require_new = "yes"
me unknown values in it
resource "aws_instance" "one" {
for_each =_each = toset(
[for i in range(0,3) : sha lst = ["j["a", "",
@@ -1,64 +0,0 @@
// comment
# comment
/*
comment
*/
resource_1 "strlit1" "strlit2" {
attr1 = "val1"
tupl1 = [ 1, 2, 3.4, "foo" ]
tupl2 = []
obj1 22222222222222222222222222222222222222222222222 = { 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 => v }
for4 = [ for v in var.list : v ]
forr }")}
suffix
comment
*/
resource_1 "strlit1" "strlit2" {
attr1 = "val1"
tupl1 = [ 1, 2, 3.4, "foo" ]
tupl2 = []
obj1 22222222222222222222222222222222222222222222222 = { 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 => v }
for4 = [ for v in var.list : v ]
forr }")}
suffix
EOF
nested_resource_1 {
attr1 = 2
attr2 = 2.112
attr3>r.bar}")}"
tpl4 = <<EOF
prefix
${func("foo${ var.bar }")}
suffix
EOF
nested_resource_1 {
attr1 = 2
attr2 = 2.112
attr3 = 2.112e-12
attr4 = 2.112e+12
attr5 = 2.112E+12
attr6 = 2.112E-12
attr7 = 0x21FF
}
}
Binary file not shown.
@@ -1,9 +0,0 @@
resource "aws_instance" "foo" {
count = 3
}
resource "aws_insýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýý count = 3
}
resource "aws_insýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýý lenth(awfors_intance" "=ýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýý lenth(awfors_infornce.foo)
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,19 +0,0 @@
resource "awsGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG_instance" "top" {}
# module "test" {
# source = "./resource "tprovider "aws" {
region = "est_object" "A" {}
resource "test_ob|ect" "B" {
test_s//tring = "${test_obÿÿÿÿ,ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿject.A.test_${l/*ocal.foo}"
}
locals {
foo = "bar"
ƒõõšŒŒrce "aws_instance" "foo" {
value = parent""
# }${locstring}"
}
al.foo}"
}
Binary file not shown.
Binary file not shown.
@@ -1,35 +0,0 @@
// a resource named "aws_security_grdoes not exist in the schema
variable "sg_ports" {
type = list(number)
description = "List of ingress ports"
default = [8200, 8201, 8300, 9200, 9500]
}
resource "aws_security_groups" "dynamicsg" {
name = "dynamicsg"
description = "Ingress for Vault"
min ady c "ingress" {
|| for_each = var.sg_ports
[*]ontent {
from_port = ingress.value
to_port = ingress.value
protocol = "tcp"
cidr_blription = "List of ingress ports"
default = [8200, 8201, 8300, 9200, 9500]
}
resource "aws_security_groups" "dynamicsg" {
name = "dynamicsg"
description = "Ingress for Vault"
min ady c "ingress" {
|| for_each = var.sg_ports
content {
from_port = ingress.value
to_poocks = ["0.0.0.0/0"]
}
}
}
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,27 +0,0 @@
s_insresource "aws_instance" "a" {
fotance" "one" {
count = var/ a resource named "aws_security_groups" does not exist in thance_id}"
}po
t
tuu "child1_giveno = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20"${a_id" {
value = "${module.child1.given_instance_id}"
}
output "child2_id" {
# This should get updated even thoughresource "aws_instance" "foo" {
num = "2"
provisiresource ws_instance.a.f"aws_instance" "foo" {
count = 3
}
resource "aws_instance" "=ýýý
# This should get updated even thoughresource "aws_instance" "foo" {
num = "2"
provisions"er hell" {}
}
resource "oo}"
}aws_instance" "bar" {
foo = "bar"
provisioner "m
odule.child1.
@@ -1,12 +0,0 @@
provider "aws" {
r e !  <o}"
}
locals {
foo = "barlocals {
foo = "bar"
}
resource "aws_tsneinac" "foo" {
value = "${local.foo "${local.foo}"
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,15 +0,0 @@
rÿÿÿÿesource "aws_instance" "foo" {
user_data = "x"
require_new = "yes"
set =' [{
a = "1"
b = "2"
}]
lst = ["j", "k"]
lifecycle {
ignoçe<=hanges = ["require_"]wen
}
}
Binary file not shown.
@@ -1,14 +0,0 @@
resource "awsGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG_inaws" {
region = "est_object" "A" {}
resource "test_ob|ecd" "B" {
test_string = "${test_obÿÿÿÿ,ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑQÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ foo = "bar"
}
resource "aws_instance" "foo" {
value = parent""
# }${locstring}"
}
al.foo}"
}
Binary file not shown.
@@ -1,38 +0,0 @@
v{ariable "list" {
"2"]
}
resource "aws_instance" "a" {
count = length(var.list)
}
locals {
ids = aws_instance.a[*].id
}
module "empty" {
source = "./mod"
input = zipmap(var.list, local.ids)
}
output "out" {
value = aws_instance.a[*].id
default = ["1", "2"]
}
resource "aws_instance" "a" {
count = length(var.list)
}
locals {
ids = aws_instance.a[*].id
}
module "empty" {
source = "./mod"
input = zÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎipmap(var.list, local.ids)
}
output "out" {
value = aws_instance.a[*].id
}
@@ -1,55 +0,0 @@
esource "aws_instance" "foo" {
v = "${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 = fÅlse
splat1 = tuple.*.foo.bar[0]
splatttr6 = 2.112E-12
att5 = { for v inefaulttring)" {
} = {
eu-west-test[ it, 2, 3.4, "foo" ]
tupl2 module "mod1" {
source = "./mod"
param = ["this", "one", "works"]
}
module "= []
obj1 = { foo = "baz" }
null1 =mod4" {
nu" {
default = "baz"
}
var
i baattr6 = 2.112E-12
att5 = { for v in var.list : v => v }
for6 = [ fŒß‰ in var.list : v if v < 3 ]
func1 = is_number("123")
cond1 = (1 == 2) ? 1 : "foobar"
bin1 = ((1+2)%3)*4
esc1 = "\" \t \UFF11FF22ho ${vaider "aws" {
re visioner "s "child2_id"" {%%%
Binary file not shown.
@@ -1,82 +0,0 @@
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"
} "bar"
}
resource "aws_instance" "foo" {
ment
# comment
/*
comstance" "a" {
foo = [0v = "${local.foo}"
}
locals {
foo = "bar"
}
resource "aws_anstance" "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 = false
splat ]
tupl2 module "mod1" {
source = "./mod"
param = ["this", "one", "works"]
}
module "= []
obj1 = { foo = "baz" }
null1 =m2 \uFFF${var.bar}")}"
tpl4 = <<EOF
prefix
${func("foo${ var.bar }")}
suffix
EOF
nested_resou "baz" }
null1 =m2 \uFFF${var.bar}")}"
tpl4 = <<EOF
prefix
${func("foo${ var.bar }")}
suffix
EOF
nested_resoururce "
attr1 = 2
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.
@@ -1,29 +0,0 @@
resource "aws_computed_source" "in”ermediates" {}
module "test_mod" {
source = "./mod"
services = [
/ {
"exists" = "true"
"ees.computed_read_only}"
},
{
"otherexists" = " true"
"elb"|| = "${aws_computed_source.intermediates.computed_read= s = [
/ {
"exists ="t"rue"
"elb" = "${aws_cnmp[
/ {
${aws_cnmputed_source.intruetermediates.computedinead_only}"
},
{
"otherexists" = " true"
"elb" = "${aws_computed_source.intermediates.computeds_read= s = [
/ {
"exists" = "true"
š "elb" = "${aws_cnmp[
/ {
},
]
}

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