Introduction
Sometimes you need to copy files from your computer to a server when creating infrastructure. The file provisioner in Terraform helps you do this automatically during resource creation.
When you want to copy a configuration file to a new virtual machine during setup.
When you need to upload a script to a server to run later.
When you want to place a certificate or key file on a remote machine securely.
When you want to automate copying files instead of doing it manually after deployment.
When you want to ensure files are present on a server as part of your infrastructure code.