Terraform works with the infrastructure, while software and OS on servers are operated by other IaC management systems: Ansible, Chef, Salt, etc. They can be used in combination with Docker and other containerization systems.