terraform-aws-modules / terraform-aws-datadog-forwarders

Terraform module to create resources on AWS to forward logs/metrics to Datadog 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/datadog-forwarders/aws
Apache License 2.0
56 stars 40 forks source link

fix: runtime must be python3.7 #17

Closed Vrtak-CZ closed 2 years ago

Vrtak-CZ commented 2 years ago

because python 3.8 & 3.9 are not supported yet

Description

see here https://github.com/DataDog/datadog-serverless-functions/issues/506#issuecomment-952842743

Motivation and Context

solves https://github.com/clowdhaus/terraform-aws-datadog-forwarders/issues/14

How Has This Been Tested?

Tested by force setting runtime variable to python3.7

bryantbiggs commented 2 years ago

can you execute pre-commit run -a on your PR please

Vrtak-CZ commented 2 years ago

@bryantbiggs Sure but... What is this pre-commit executable? I do not have it.

Vrtak-CZ commented 2 years ago

@bryantbiggs ok i just google it and run it but it ended up with some errors

ella:terraform-aws-datadog-forwarders:% pre-commit run -a                                                                                                                           <log-forwarder-runtime>
[INFO] Initializing environment for https://github.com/antonbabenko/pre-commit-terraform.
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
Terraform fmt............................................................Failed
- hook id: terraform_fmt
- exit code: 1

/Users/vrtak-cz/.cache/pre-commit/repoowntkk7e/hooks/terraform_fmt.sh: line 9: realpath: command not found
/Users/vrtak-cz/.cache/pre-commit/repoowntkk7e/hooks/terraform_fmt.sh: line 11: ./_common.sh: No such file or directory
/Users/vrtak-cz/.cache/pre-commit/repoowntkk7e/hooks/terraform_fmt.sh: line 9: realpath: command not found
/Users/vrtak-cz/.cache/pre-commit/repoowntkk7e/hooks/terraform_fmt.sh: line 11: ./_common.sh: No such file or directory
/Users/vrtak-cz/.cache/pre-commit/repoowntkk7e/hooks/terraform_fmt.sh: line 9: realpath: command not found
/Users/vrtak-cz/.cache/pre-commit/repoowntkk7e/hooks/terraform_fmt.sh: line 11: ./_common.sh: No such file or directory
/Users/vrtak-cz/.cache/pre-commit/repoowntkk7e/hooks/terraform_fmt.sh: line 9: realpath: command not found
/Users/vrtak-cz/.cache/pre-commit/repoowntkk7e/hooks/terraform_fmt.sh: line 11: ./_common.sh: No such file or directory
/Users/vrtak-cz/.cache/pre-commit/repoowntkk7e/hooks/terraform_fmt.sh: line 9: realpath: command not found
/Users/vrtak-cz/.cache/pre-commit/repoowntkk7e/hooks/terraform_fmt.sh: line 11: ./_common.sh: No such file or directory

Terraform validate.......................................................Failed
- hook id: terraform_validate
- exit code: 1

/Users/vrtak-cz/.cache/pre-commit/repoowntkk7e/hooks/terraform_validate.sh: line 9: realpath: command not found
/Users/vrtak-cz/.cache/pre-commit/repoowntkk7e/hooks/terraform_validate.sh: line 11: ./_common.sh: No such file or directory

Terraform docs...........................................................Failed
- hook id: terraform_docs
- exit code: 1

/Users/vrtak-cz/.cache/pre-commit/repoowntkk7e/hooks/terraform_docs.sh: line 9: realpath: command not found
/Users/vrtak-cz/.cache/pre-commit/repoowntkk7e/hooks/terraform_docs.sh: line 11: ./_common.sh: No such file or directory

Terraform validate with tflint...........................................Failed
- hook id: terraform_tflint
- exit code: 1

/Users/vrtak-cz/.cache/pre-commit/repoowntkk7e/hooks/terraform_tflint.sh: line 9: realpath: command not found
/Users/vrtak-cz/.cache/pre-commit/repoowntkk7e/hooks/terraform_tflint.sh: line 11: ./_common.sh: No such file or directory

check for merge conflicts................................................Passed
fix end of files.........................................................Passed

This repo does not contains file ./_common.sh.

Vrtak-CZ commented 2 years ago

@bryantbiggs ok after some time of digging I was able to run it...

By digging i mean update https://github.com/antonbabenko/pre-commit-terraform to v1.67.0 run terraform init in examples/simple.

bryantbiggs commented 2 years ago

:tada: This PR is included in version 4.0.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

github-actions[bot] commented 2 years ago

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.