Changes in this commit make sure that Yor searches in the right folder when determining if module in question is taggable.
For example, before this commit, Yor will skip the policy module:
module "policy" {
source = "terraform-aws-modules/iam/aws//modules/iam-policy"
version = "5.5.4"
# more here
}
The problem was that Yor was searching for the variables block in the .terraform/modules/policy/*.tf, ignoring the fact that module source tells us that we need to use modules/iam-policy subdirectory.
To remedy the situation, We added a new function that extracts subdirectory from the source and appends it to the search path.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Changes in this commit make sure that Yor searches in the right folder when determining if module in question is taggable.
For example, before this commit, Yor will skip the policy module:
The problem was that Yor was searching for the variables block in the .terraform/modules/policy/*.tf, ignoring the fact that module source tells us that we need to use modules/iam-policy subdirectory.
To remedy the situation, We added a new function that extracts subdirectory from the source and appends it to the search path.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.