We have now looked at two modes for creating AWS EC2 instances: using AWS Management Console and using AWS CLI. These can be automated using the AWS cloud native service called CloudFormation template, as we saw in Chapter 3, Treating Your Infrastructure as Code. This is only applicable for use with the AWS cloud. In this chapter, we will achieve the same results of provisioning AWS instances using Terraform. Refer to https://www.terraform.io/intro/vs/cloudformation.html to understand the differences between Terraform and CloudFormation.
Let's create a dedicated repository in our GitHub account and start our journey with Terraform. Once you've logged in to GitHub, create a new repository for the Terraform templates by following the steps below:
- In your browser, openhttps://github.com/new.
- Call the new repository
EffectiveDevOpsTerraformas shown in the following screenshot:
- Check the
Initialize this repository with a READMEcheckbox.
- Finally, click the