Member-only story
Infrastructure as code - from Terraform to AWS
Terraform seems to be the go to tool these days for anything infrastructure as code, but is it possible to become an expert quickly? — by Craig Godden-Payne@beardy.digital
Terraform enables you to safely and predictably create, change, and improve infrastructure. It is an open source tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned
If you’ve worked with CloudFormation before, it is a similar concept as in it provisions infrastructure, but it has much greater power, as it can be run against multiple cloud providers, such as Amazon Web Services, Microsoft Azure and Google Cloud Platform.
I find the best way to learn a new tool, or to improve is to get some hands on experience.
This post hopes to guide you through a basic scenario, of setting up some infrastructure using terraform in the AWS cloud platform.
Prerequisites
Download terraform. It’s pretty simple on any operating system, and usually just involves downloading the binaries and adding them to the path of your shell.
Creating a user in AWS
In order to use terraform to provision infrastructure within AWS, you will need a way for terraform to authenticate with AWS. To do this, we are going to create a user in AWS, and…