devops-infra / action-terraform-validate

GitHub Action that will run terraform validate.
https://christophshyper.github.io/
MIT License
6 stars 2 forks source link

Action can't find git? #65

Closed thaithcock closed 1 year ago

thaithcock commented 1 year ago

:memo: Brief description

Hi there, I've got a repository full of modules and would really like to use this action to do an easy first check of all of them without needing to specify each one. However, it looks like the action is having problems finding module sources through git. For example,

module "db" {
  source  = "terraform-aws-modules/rds/aws"
}

yields an error:

│ Error: Failed to download module
│ 
│ Could not download module "db" (main.tf:37) source code from
│ "git::https://github.com/terraform-aws-modules/terraform-aws-rds?ref=v6.2.0":
│ error downloading
│ 'https://github.com/terraform-aws-modules/terraform-aws-rds?ref=v6.2.0':
│ git must be available and on the PATH.
╵

Checking the Dockerfile, it looks like there it should have git in the image from being based on the terragrunt image, so it seems like it should be able to load modules this way just fine. Any ideas? Maybe I'm using it wrong?

:warning: Checklist

Check CONTRIBUTING.md and CODE_OF_CONDUCT.md for more information

ChristophShyper commented 1 year ago

Hi! Thanks for taking an interest. I'm adding git for you.

thaithcock commented 12 months ago

Thanks a lot for the quick response @ChristophShyper! Confirmed it is working for me 🙌

One last thing, do you need to create a new release version? It looks like the latest is still v0.3. I'm targeting the commit hash - it's not required, but it would be a better experience for sure.

ChristophShyper commented 12 months ago

Hi! I forgot to update release numbering after my holidays. WIll release it as v0.3.1. But since it's not a breaking change will leave v0.3 as it is already.