@@ -133,49 +133,19 @@ var componentSchema = &hcl.BodySchema{
133133 },
134134}
135135
136- // stackSchema defines the schema for Terraform Stacks files
136+ // stackSchema defines the schema for Terraform Stacks files based on Terraform core's rootConfigSchema
137137var stackSchema = & hcl.BodySchema {
138- Blocks : []hcl.BlockHeaderSchema {
139- {
140- Type : "terraform" ,
141- LabelNames : nil ,
142- },
143- {
144- Type : "variable" ,
145- LabelNames : []string {"name" },
146- },
147- {
148- Type : "output" ,
149- LabelNames : []string {"name" },
150- },
151- {
152- Type : "provider" ,
153- LabelNames : []string {"name" , "config_name" },
154- },
155- {
156- Type : "component" ,
157- LabelNames : []string {"name" },
158- },
159- {
160- Type : "required_providers" ,
161- LabelNames : nil ,
162- },
163- },
164- }
165-
166- // stackProviderSchema defines the schema for provider blocks in stacks
167- var stackProviderSchema = & hcl.BodySchema {
168138 Attributes : []hcl.AttributeSchema {
169- {
170- Name : "for_each" ,
171- },
172- {
173- Name : "config" ,
174- },
139+ {Name : "language" },
175140 },
176141 Blocks : []hcl.BlockHeaderSchema {
177- {
178- Type : "config" ,
179- },
142+ {Type : "stack" , LabelNames : []string {"name" }},
143+ {Type : "component" , LabelNames : []string {"name" }},
144+ {Type : "variable" , LabelNames : []string {"name" }},
145+ {Type : "locals" },
146+ {Type : "output" , LabelNames : []string {"name" }},
147+ {Type : "provider" , LabelNames : []string {"type" , "name" }},
148+ {Type : "required_providers" },
149+ {Type : "removed" },
180150 },
181151}
0 commit comments