Open yu-iskw opened 2 years ago
Hi @yu-iskw,
This sounds like an interesting discussion point. Maybe you can bring this over to our Discord community and talk about it in more detail?
Here's the link: https://discord.gg/Z3TJw3NX
Is it possible to write terrascan as a bash script so that it's executed automatically whenever terraform plan command is run ?
Is this helpfully specially when working huge modular terraform project
Description
This post is just a question about the best practice to test custom policies. We have just started taking advantage of custom policies. I am looking for a better way to implement something like unit tests for custom policies. I would like to know how others handle the issue.
We may have two possible approaches to improve features. That would be broadly helpful to the community.
What I Did
I uses custom policies for a terraform project. So, I implement testing resources in terraform to make sure custom policies. in a dummy terraform project Moreover, I execute the shell script to check if violations are expected or not. We also run a github action to run tests on a pull request.