You can write your own providers for Terraform[0] and bake whatever you want into its HCL syntax. In your case, this might not have significant returns over bootstrapping with Ansible/Chef/Puppet -- it all depends on what you want to do.
[0]: https://www.hashicorp.com/blog/terraform-custom-providers.ht...