-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
2.hcl
166 lines (132 loc) · 3.05 KB
/
2.hcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#real
terraform {
extra_arguments "common_vars" {
commands = ["plan", "apply"]
arguments = [
"-var-file=../../common.tfvars",
"-var-file=../region.tfvars"
]
}
before_hook "before_hook" {
commands = ["apply", "plan"]
execute = ["echo", "Running Terraform"]
}
source = "github.com/myuser/myrepo//folder/modules/moduleone?ref=v0.0.9"
after_hook "after_hook" {
commands = ["apply", "plan"]
execute = ["echo", "Finished running Terraform"]
run_on_error = true
}
}
#foo
terraform {
source = "github.com/hashicorp/example?ref=v1.0.0"
}
#bar
terraform {
source = "github.com/hashicorp/example?ref=next"
}
#IP
terraform {
source = "https://104.196.242.174/example?ref=next"
}
#local hostname
terraform {
source = "my.host.local/example?ref=v1.2.1"
}
#local hostname
terraform {
source = "my.host/modules/test"
}
#local hostname
terraform {
source = "my.host/modules/test?ref=v1.2.1"
}
#local hostname
terraform {
source = "my.host"
}
#local hostname
terraform {
source = "my.host.local/sources/example?ref=v1.2.1"
}
#hostname
terraform {
source = "my.host/example?ref=next"
}
#invalid
terraform {
source = "//terraform/module/test?ref=next"
}
#repo-with-non-semver-ref
terraform {
source = "github.com/githubuser/myrepo//terraform/modules/moduleone?ref=tfmodule_one-v0.0.9"
}
#repo-with-dot
terraform {
source = "github.com/hashicorp/example.2.3?ref=v1.0.0"
}
#repo-with-dot-and-git-suffix
terraform {
source = "github.com/hashicorp/example.2.3.git?ref=v1.0.0"
}
#source without pinning
terraform {
source = "hashicorp/consul/aws"
}
# source with double-slash
terraform {
source = "github.com/tieto-cem/terraform-aws-ecs-task-definition//modules/container-definition?ref=v0.1.0"
}
# regular sources
terraform {
source = "github.com/tieto-cem/terraform-aws-ecs-task-definition?ref=v0.1.0"
}
terraform {
source = "git@github.com:hashicorp/example.git?ref=v2.0.0"
}
terraform {
source = "terraform-aws-modules/security-group/aws//modules/http-80"
}
terraform {
source = "terraform-aws-modules/security-group/aws"
}
terraform {
source = "../../terraforms/fe"
}
# nosource, ignored by test since it does not have source on the next line
terraform {
foo = "bar"
}
# foobar
terraform {
source = "https://bitbucket.com/hashicorp/example?ref=v1.0.0"
}
# gittags
terraform {
source = "git::https://bitbucket.com/hashicorp/example?ref=v1.0.0"
}
# gittags_badversion
terraform {
source = "git::https://bitbucket.com/hashicorp/example?ref=next"
}
# gittags_subdir
terraform {
source = "git::https://bitbucket.com/hashicorp/example//subdir/test?ref=v1.0.1"
}
# gittags_http
terraform {
source = "git::http://bitbucket.com/hashicorp/example?ref=v1.0.2"
}
# gittags_ssh
terraform {
source = "git::ssh://git@bitbucket.com/hashicorp/example?ref=v1.0.3"
}
# invalid, ignored by test since it does not have source on the next line
terraform {
}
# unsupported terragrunt, ignored by test since it does not have source on the next line
terraform {
name = "foo"
dummy = "true"
}