I've created some Terraform to connect to Opnsense and apply some threat intel WAN & LAN rules:
https://github.com/chrisreeves-/scripts/tree/master/terraform/opnsense
The readme.md also talks about some typical configuration you might want to do to enhance your firewall over just firewall rules.
If you like this and use it, please just star the repo to say thanks! :)
Happy for PRs to develop this more
Bumping for visibility