-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(TFECO-7942) builtin refs from tf schema (#1854)
* source version specific built-in references from terraform-schema * add changie entry
- Loading branch information
Showing
5 changed files
with
26 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: ENHANCEMENTS | ||
body: Support terraform.applying built-in reference starting at TF 1.10 | ||
time: 2024-10-29T16:17:07.267245+01:00 | ||
custom: | ||
Issue: "1854" | ||
Repository: terraform-ls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: MPL-2.0 | ||
|
||
package decoder | ||
|
||
import ( | ||
"github.com/hashicorp/hcl-lang/reference" | ||
"github.com/hashicorp/terraform-ls/internal/features/modules/state" | ||
tfschema "github.com/hashicorp/terraform-schema/schema" | ||
) | ||
|
||
func referencesForModule(mod *state.ModuleRecord, stateReader CombinedReader) reference.Targets { | ||
modPath := mod.Path() | ||
resolvedVersion := tfschema.ResolveVersion(stateReader.TerraformVersion(modPath), mod.Meta.CoreRequirements) | ||
|
||
return tfschema.BuiltinReferencesForVersion(resolvedVersion, modPath) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters