Why provisioners run scripts on resources
📖 Scenario: You are setting up a virtual machine in the cloud. After creating the machine, you want to install software automatically on it. This helps save time and ensures the machine is ready to use right after creation.
🎯 Goal: Learn how to use Terraform provisioners to run scripts on cloud resources after they are created.
📋 What You'll Learn
Create a virtual machine resource
Add a provisioner to run a script on the virtual machine
Use a local-exec provisioner to run a simple command
Use a remote-exec provisioner to run commands on the machine
💡 Why This Matters
🌍 Real World
Automating software installation and configuration on cloud servers right after they are created saves time and reduces manual errors.
💼 Career
Cloud engineers and DevOps professionals use provisioners to automate resource setup, making deployments faster and more reliable.
Progress0 / 4 steps