Introduction
Sometimes after creating a server, you want to run commands on it to set it up. The remote-exec provisioner in Terraform lets you do this by connecting to the server and running commands automatically.
When you want to install software on a new virtual machine right after it is created.
When you need to configure settings on a server that Terraform created without logging in manually.
When you want to run a script on a remote server to prepare it for your application.
When you want to automate server setup steps like updating packages or starting services.
When you want to run commands on a server in a cloud environment right after deployment.