O'Reilly logo

Effective DevOps with AWS - Second Edition by Nathaniel Felsen, Giuseppe Borgese, Yogesh Raheja

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required