Category Archives: Terraform

Create AWS Cloudfront Distribution using Terraform

In this post, we’ll create the AWS Cloudfront Distribution using Terraform and for this, we need the latest version of Terraform.

Terraform v0.6.15
  • Complete Cloudfront Terraform Plan as gist
  • Complete Variables as gist

Before using the terraform, we need to export AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY as environment variables:

export AWS_ACCESS_KEY_ID="xxxxxxxxxxxxxxxx"
export AWS_SECRET_ACCESS_KEY="yyyyyyyyyyyyyyyyyyyy"

Read more of this post

Advertisements

How to compile a development version of Terraform

In this tutorial I’ll describe all the steps to build the development version of Terraform. At the end of this process, it will generate a set of binaries for each supported platforms(Linux, Mac OS X, Windows etc..).

First we need to clone the terraform’s github offical repo:

git clone https://github.com/hashicorp/terraform.git

Move inside the cloned repo:

cd terraform

Read more of this post

Highly-Available WordPress Setup inside AWS VPC using Terraform & Ansible

In this post,we’ll create the Infrastructure for Highly-Available WordPress website over AWS using Terraform and then install the WordPress using Ansible. If you don’t know about the Terraform, please check this link.

We’ll use the Terraform to create the fully operational AWS VPC infrastructure(subnets,routeing tables,igw etc), it will also create everything that need to be for creating EC2 and RDS instances (security key, security group, subnet group). It will also create the Elastic Load Balancer and add the EC2 instance(s) automatically to it as well as creating the Route53 entry for this wordpress site and add the ELB alias to it.

Ansible will be used to deploy the wordpress on the EC2 instances that have been created via Terraform, that will be fault tolerant and highly available.

Requirements:

  • Terraform
  • Ansible
  • AWS admin access

Tools Used: Read more of this post

%d bloggers like this: