Terraform Infrastructure as code (IAC)
Most AWS people knows and use Cloud Formation but how about making it much easier to use.
Today I tested the Terraform solution by Hashi Corp https://www.terraform.io/ it so far it turns out to be quite
simple to use.
- Multi Plataform/Provider
- Simple Configuration files
- Simple Commands
Terraform similarly uses configuration files to detail the infrastructure setup, but it goes further by being both cloud-agnostic and enabling multiple providers and services to be combined and composed. Example VMWare,VirtualBox, AWS to work with the same commands. Further more
using Packer we can assure they all have exactly the same O.S. and software running.
For example, to deploy a new version of OpenSSL, you would create a new image using Packer or Docker with the new version of OpenSSL already installed, deploy that image across a set of totally new servers, and then undeploy the old servers
It seems to me it automates many not defined resources.. Lets take a look at two basic configurations:
Terraform Most Basic EC2 instance creation file
example.tf:
provider "aws" {
access_key = "AKIAIXBOBOJFFKWTM52AA"
secret_key = "Nw2HWLXxtEWEwB6U123vXqByBOzTf"
region = "sa-east-1"
}
resource "aws_instance" "example" {
ami = "ami-1ebfe8f2"
instance_type = "t2.micro"
}
AWS Simple EC2 Instance Example here
It provides a single unified syntax, instead of requiring operators to use independent and non-interoperable tools for each platform and service.
]]>