A second Terraform template for deploying a Hello World application

Go into the EffectiveDevOpsTerraform repository and create a directory called second project:

$ mkdir secondproject$ cd secondproject

Now that we have created our EC2 instance with the Terraform template in the previous section, we are ready to extend the provisioning of our Hello World web application. We are going to use Terraform Provisioner to recreate the Hello World stack that we previously made using the UserDatablock field of CloudFormation in Chapter 2Deploying Your First Web Application and using Ansible roles in Chapter 3Treating Your Infrastructure as Code. If you recall, the UserData field looked roughly like this:

yum install --enablerepo=epel -y nodejs ...

Get Effective DevOps with AWS - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.