Skip to content

Commit

Permalink
Change language ID to OpenTofu
Browse files Browse the repository at this point in the history
Signed-off-by: Ronny Orot <[email protected]>
  • Loading branch information
Evi1Pumpkin committed Dec 25, 2024
1 parent fc34584 commit 872b564
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions schema/language_ids.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
package schema

const (
ModuleLanguageID = "terraform"
VariablesLanguageID = "terraform-vars"
ModuleLanguageID = "opentofu"
VariablesLanguageID = "opentofu-vars"
)
2 changes: 1 addition & 1 deletion schema/module_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ func schemaForDependentModuleBlock(module module.DeclaredModuleCall, modMeta *mo
bodySchema.Targets = &schema.Target{
Path: lang.Path{
Path: modMeta.Path,
LanguageID: "terraform",
LanguageID: "opentofu",
},
Range: hcl.Range{
Filename: filename,
Expand Down
12 changes: 6 additions & 6 deletions schema/module_schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func TestSchemaForDependentModuleBlock_basic(t *testing.T) {
},
Path: lang.Path{
Path: "./local",
LanguageID: "terraform",
LanguageID: "opentofu",
},
Constraints: schema.Constraints{
ScopeId: "variable",
Expand All @@ -115,7 +115,7 @@ func TestSchemaForDependentModuleBlock_basic(t *testing.T) {
},
Path: lang.Path{
Path: "./local",
LanguageID: "terraform",
LanguageID: "opentofu",
},
Constraints: schema.Constraints{
ScopeId: "variable",
Expand Down Expand Up @@ -183,7 +183,7 @@ func TestSchemaForDependentModuleBlock_basic(t *testing.T) {
lang.RootStep{Name: "output"},
lang.AttrStep{Name: "first"},
},
Path: lang.Path{Path: "./local", LanguageID: "terraform"},
Path: lang.Path{Path: "./local", LanguageID: "opentofu"},
Constraints: schema.Constraints{ScopeId: "output"},
},
{
Expand All @@ -196,7 +196,7 @@ func TestSchemaForDependentModuleBlock_basic(t *testing.T) {
lang.RootStep{Name: "output"},
lang.AttrStep{Name: "second"},
},
Path: lang.Path{Path: "./local", LanguageID: "terraform"},
Path: lang.Path{Path: "./local", LanguageID: "opentofu"},
Constraints: schema.Constraints{ScopeId: "output"},
},
},
Expand Down Expand Up @@ -266,7 +266,7 @@ func TestSchemaForDependentModuleBlock_Target(t *testing.T) {
},
},
Targets: &schema.Target{
Path: lang.Path{Path: "./local", LanguageID: "terraform"},
Path: lang.Path{Path: "./local", LanguageID: "opentofu"},
Range: hcl.Range{
Filename: "a_file.tf",
Start: hcl.InitialPos,
Expand Down Expand Up @@ -298,7 +298,7 @@ func TestSchemaForDependentModuleBlock_Target(t *testing.T) {
},
},
Targets: &schema.Target{
Path: lang.Path{Path: "./local", LanguageID: "terraform"},
Path: lang.Path{Path: "./local", LanguageID: "opentofu"},
Range: hcl.Range{
Filename: "main.tf",
Start: hcl.InitialPos,
Expand Down
4 changes: 2 additions & 2 deletions schema/schema_merge_v015_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ var moduleWithDependency = schema.BlockSchema{
},
Path: lang.Path{
Path: "path",
LanguageID: "terraform",
LanguageID: "opentofu",
},
Constraints: schema.Constraints{
ScopeId: "variable",
Expand Down Expand Up @@ -537,7 +537,7 @@ var expectedRemoteModuleSchema = &schema.BlockSchema{
},
Path: lang.Path{
Path: ".terraform/modules/remote-example",
LanguageID: "terraform",
LanguageID: "opentofu",
},
Constraints: schema.Constraints{
ScopeId: "variable",
Expand Down
6 changes: 3 additions & 3 deletions schema/variable_schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func TestSchemaForVariables(t *testing.T) {
Constraint: schema.LiteralType{Type: cty.String},
OriginForTarget: &schema.PathTarget{
Address: schema.Address{schema.StaticStep{Name: "var"}, schema.AttrNameStep{}},
Path: lang.Path{Path: "./local", LanguageID: "terraform"},
Path: lang.Path{Path: "./local", LanguageID: "opentofu"},
Constraints: schema.Constraints{ScopeId: "variable", Type: cty.String},
},
},
Expand Down Expand Up @@ -76,7 +76,7 @@ func TestSchemaForVariables(t *testing.T) {
Constraint: schema.LiteralType{Type: cty.String},
OriginForTarget: &schema.PathTarget{
Address: schema.Address{schema.StaticStep{Name: "var"}, schema.AttrNameStep{}},
Path: lang.Path{Path: "./local", LanguageID: "terraform"},
Path: lang.Path{Path: "./local", LanguageID: "opentofu"},
Constraints: schema.Constraints{ScopeId: "variable", Type: cty.String},
},
},
Expand All @@ -90,7 +90,7 @@ func TestSchemaForVariables(t *testing.T) {
IsRequired: true,
OriginForTarget: &schema.PathTarget{
Address: schema.Address{schema.StaticStep{Name: "var"}, schema.AttrNameStep{}},
Path: lang.Path{Path: "./local", LanguageID: "terraform"},
Path: lang.Path{Path: "./local", LanguageID: "opentofu"},
Constraints: schema.Constraints{ScopeId: "variable", Type: cty.Number},
},
},
Expand Down

0 comments on commit 872b564

Please sign in to comment.