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

File function is unknown #204

Closed
alshabib opened this issue Jun 7, 2018 · 2 comments
Closed

File function is unknown #204

alshabib opened this issue Jun 7, 2018 · 2 comments

Comments

@alshabib
Copy link

alshabib commented Jun 7, 2018

This valid terraform syntax

private_key = "${var.use_literal_key ? var.private_key : file(var.private_key_file)}"

causes

Evaluation error: 1:43: unknown function called: file in build.tf:37

This is part of a module definition. Is there any workaround?

@wata727
Copy link
Member

wata727 commented Jun 10, 2018

Hi @alshabib,

Sorry for the inconvenience. This is a bug that occurs because Terraform's variable interpolation is not fully supported. In the future, I'm going to fix the bug by embedding Terraform as a library.

As a workaround, you can specify ignore_module like #167 (comment)

@wata727
Copy link
Member

wata727 commented May 25, 2019

I just released TFLint v0.8.0 and fix the issue. Please try the latest version again. If you still have problems, please open a new issue instead of reopening.

@wata727 wata727 closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants