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

Support for Terraform 1.8 Provider Functions #1014

Open
o-otte opened this issue Oct 30, 2024 · 0 comments
Open

Support for Terraform 1.8 Provider Functions #1014

o-otte opened this issue Oct 30, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@o-otte
Copy link

o-otte commented Oct 30, 2024

Support for Terraform 1.8 Provider Functions

Hello!

When using provider functions that were introduced with Terraform 1.8, it is not possible to parse *.tf files containing those function invocations.

How to reproduce

When using a provider functions like in this example:

# test.tf
terraform {
  required_providers {
    local = {
      source = "hashicorp/local"
    }
  }
  required_version = ">= 1.8.0"
}

output "example_output" {
  value = provider::local::direxists("${path.module}/test")
}

Leading to

$ conftest parse test.tf
Error: parse configurations: parser unmarshal: convert to bytes: parse config: [:11,19-20: Missing newline after argument; An argument definition must end with a newline.], path: test.tf

Context

It seems that support for those provider function was added in hcl/v2 >= v2.20.1. As far as I can see, conftest uses v2.17.0.

@boranx boranx added the enhancement New feature or request label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants