StyraInc / opa-aws-cloudformation-hook

AWS Cloudformation Hook for OPA-powered infrastructure policy enforcement
Apache License 2.0
35 stars 5 forks source link

add timeout to OPA query #34

Closed JordanHoeft closed 2 years ago

JordanHoeft commented 2 years ago

In the situation where OPA is unreachable, this post will just hang and cloudformation will fail the hook after 30 seconds. This causes the hook logs in cloudwatch to end at Hook triggered for target....

Adding a timeout allows the post to fail and properly log the failed connection. Happy to make it a different value but 10 seconds seemed reasonable.

anderseknert commented 2 years ago

Thank you!