Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace coreFunctions with the new functions merger #1613

Closed
3 tasks done
dbanck opened this issue Feb 6, 2024 · 1 comment · Fixed by #1636
Closed
3 tasks done

Replace coreFunctions with the new functions merger #1613

dbanck opened this issue Feb 6, 2024 · 1 comment · Fixed by #1636
Assignees
Labels
enhancement New feature or request

Comments

@dbanck
Copy link
Member

dbanck commented Feb 6, 2024

Background

We currently support all built-in core functions as static definitions in terraform-schema. The provider functions will be part of the provider schema JSON and should be parsed whenever we get a provider schema (bundled or via CLI). Both need to be merged into a single list of function signatures.

Proposal

  • Replace the existing coreFunctions helper with a new func functionsForModule(mod *state.Module, schemaReader state.SchemaReader) (map[string]schema.FunctionSignature, error) helper
  • Use the recently introduced tfschema.ResolveVersion helper, to obtain the Terraform version
  • Use the new functions merger to combine the static list of built-in functions with the provider-defined one's
@dbanck dbanck transferred this issue from hashicorp/vscode-terraform Feb 6, 2024
@dbanck dbanck added the enhancement New feature or request label Feb 6, 2024
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants