Terraform is an orchestrator. It uses Packer for automation. All of the plugins for packer must be written in the Go programing language (golang) however you can also incorporate chef and puppet.
Ansible is similar to Packer, Its modules can be written in any language (Bash, Python, Powershell, and many more) however there are so many modules you will likely never need to write one. All Automation is done using playbooks which are formatted in a human-readable data serialization language - YAML - which is both very easy to read, and very easy to write.