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

plugin: Add support for GetModulePath API #1480

Merged
merged 1 commit into from
Aug 13, 2022

Conversation

wata727
Copy link
Member

@wata727 wata727 commented Aug 12, 2022

See terraform-linters/tflint-plugin-sdk#171

This PR adds support for GetModulePath API added in terraform-linters/tflint-plugin-sdk#171.

@wata727 wata727 marked this pull request as ready for review August 13, 2022 12:25
@wata727 wata727 merged commit d8d93e0 into master Aug 13, 2022
@wata727 wata727 deleted the add_support_for_module_path branch August 13, 2022 12:25
@yashg-ti
Copy link

yashg-ti commented Jun 1, 2023

Hi
To be able to use this api in tflint-ruleset's check function, what's the required way of using the tflint command on the root file? I'm assuming it takes some recursive approach of progressing through the terraform tree. If so how to make this recursion happen?

I'm using the iterative approach currently, where I run the tflint command individually on each child module, thinking it picks the path up from the module path parameter in the command, which is kept relative to the root file directory. But that doesn't seem to be the case as it's not working, and returning 'nil' for child modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants