Terraform AWS Webserver: Configure EC2 Instance UserData and SSH Debugging

Terraform AWS Webserver: Configure EC2 Instance UserData and SSH Debugging

August 2, 2022

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.

Useful Logs

  • /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

Links

Get full access to these great resources

All for less than the price of coffee a day

44 courses
286 lessons
46+ hours

Get started with BoltOps Learn now and get access to easy and powerful lessons

BoltOps Tools