Terraform is an Infrastructure as Code tool used to create infrastructure and should never be used to configure operating systems or applications, instead, Ansible is the de facto standard for application configuration as code.
This tutorial shows how to create infrastructure in AWS using Terraform and configure the operating system and applications using Ansible.