We'll show you now to create an AWS EC2 Instance with Terraform and write UserData script that will configure the instance at launch. We're combing knowledge we've learned from in other lessons: creating an instance and security group. And making the instance more useful by installing the apache2 webserver and showing to debug all of that.
- /var/lib/cloud/instance/user-data.txt - Where UserData is found
- /var/log/cloud-init-output.log - Output of cloud-init. This is what calls your UserScript script on launch
Explore lesson as part of a learning path
Get full access to these great resources
All for less than the price of coffee a day