diff --git a/schema/language_ids.go b/schema/language_ids.go index 970cf184..d0dfe28c 100644 --- a/schema/language_ids.go +++ b/schema/language_ids.go @@ -6,6 +6,6 @@ package schema const ( - ModuleLanguageID = "terraform" - VariablesLanguageID = "terraform-vars" + ModuleLanguageID = "opentofu" + VariablesLanguageID = "opentofu-vars" ) diff --git a/schema/module_schema.go b/schema/module_schema.go index 939c871d..b64db491 100644 --- a/schema/module_schema.go +++ b/schema/module_schema.go @@ -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, diff --git a/schema/module_schema_test.go b/schema/module_schema_test.go index b277bb5b..79b01ef2 100644 --- a/schema/module_schema_test.go +++ b/schema/module_schema_test.go @@ -97,7 +97,7 @@ func TestSchemaForDependentModuleBlock_basic(t *testing.T) { }, Path: lang.Path{ Path: "./local", - LanguageID: "terraform", + LanguageID: "opentofu", }, Constraints: schema.Constraints{ ScopeId: "variable", @@ -115,7 +115,7 @@ func TestSchemaForDependentModuleBlock_basic(t *testing.T) { }, Path: lang.Path{ Path: "./local", - LanguageID: "terraform", + LanguageID: "opentofu", }, Constraints: schema.Constraints{ ScopeId: "variable", @@ -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"}, }, { @@ -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"}, }, }, @@ -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, @@ -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, diff --git a/schema/schema_merge_v015_test.go b/schema/schema_merge_v015_test.go index c244d36c..544faca9 100644 --- a/schema/schema_merge_v015_test.go +++ b/schema/schema_merge_v015_test.go @@ -449,7 +449,7 @@ var moduleWithDependency = schema.BlockSchema{ }, Path: lang.Path{ Path: "path", - LanguageID: "terraform", + LanguageID: "opentofu", }, Constraints: schema.Constraints{ ScopeId: "variable", @@ -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", diff --git a/schema/variable_schema_test.go b/schema/variable_schema_test.go index 3b78db0c..5547e3b2 100644 --- a/schema/variable_schema_test.go +++ b/schema/variable_schema_test.go @@ -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}, }, }, @@ -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}, }, }, @@ -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}, }, },