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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.