Terraform logo

Terraform

Describe your complete infrastructure as code and build resources across providers
2.4K
1.6K
+ 1
253

What is Terraform?

With Terraform, you describe your complete infrastructure as code, even as it spans multiple service providers. Your servers may come from AWS, your DNS may come from CloudFlare, and your database may come from Heroku. Terraform will build all these resources across all these providers in parallel.
Terraform is a tool in the Infrastructure Build Tools category of a tech stack.
Terraform is an open source tool with 19.9K GitHub stars and 5.3K GitHub forks. Here鈥檚 a link to Terraform's open source repository on GitHub

Who uses Terraform?

Companies
762 companies reportedly use Terraform in their tech stacks, including Uber, Instacart, and Slack.

Developers
1566 developers on StackShare have stated that they use Terraform.

Terraform Integrations

CloudFlare, Amazon EC2, Heroku, DigitalOcean, and Microsoft Azure are some of the popular tools that integrate with Terraform. Here's a list of all 28 tools that integrate with Terraform.

Why developers like Terraform?

Here鈥檚 a list of reasons why companies and developers use Terraform
Terraform Reviews

Here are some stack decisions, common use cases and reviews by companies and developers who chose Terraform in their tech stack.

Google Cloud IoT Core
Google Cloud IoT Core
Terraform
Terraform
Python
Python
Google Cloud Deployment Manager
Google Cloud Deployment Manager
Google Cloud Build
Google Cloud Build
Google Cloud Run
Google Cloud Run
Google Cloud Bigtable
Google Cloud Bigtable
Google BigQuery
Google BigQuery
Google Cloud Storage
Google Cloud Storage
Google Compute Engine
Google Compute Engine
GitHub
GitHub

Context: I wanted to create an end to end IoT data pipeline simulation in Google Cloud IoT Core and other GCP services. I never touched Terraform meaningfully until working on this project, and it's one of the best explorations in my development career. The documentation and syntax is incredibly human-readable and friendly. I'm used to building infrastructure through the google apis via Python , but I'm so glad past Sung did not make that decision. I was tempted to use Google Cloud Deployment Manager, but the templates were a bit convoluted by first impression. I'm glad past Sung did not make this decision either.

Solution: Leveraging Google Cloud Build Google Cloud Run Google Cloud Bigtable Google BigQuery Google Cloud Storage Google Compute Engine along with some other fun tools, I can deploy over 40 GCP resources using Terraform!

Check Out My Architecture: CLICK ME

Check out the GitHub repo attached

See more
Emanuel Evans
Emanuel Evans
Senior Architect at Rainforest QA | 12 upvotes 160.3K views
atRainforest QARainforest QA
Heroku
Heroku
Kubernetes
Kubernetes
Google Kubernetes Engine
Google Kubernetes Engine
Google Cloud SQL for PostgreSQL
Google Cloud SQL for PostgreSQL
PostgreSQL
PostgreSQL
Google Cloud Memorystore
Google Cloud Memorystore
Redis
Redis
CircleCI
CircleCI
Google Cloud Build
Google Cloud Build
Helm
Helm
Terraform
Terraform

We recently moved our main applications from Heroku to Kubernetes . The 3 main driving factors behind the switch were scalability (database size limits), security (the inability to set up PostgreSQL instances in private networks), and costs (GCP is cheaper for raw computing resources).

We prefer using managed services, so we are using Google Kubernetes Engine with Google Cloud SQL for PostgreSQL for our PostgreSQL databases and Google Cloud Memorystore for Redis . For our CI/CD pipeline, we are using CircleCI and Google Cloud Build to deploy applications managed with Helm . The new infrastructure is managed with Terraform .

Read the blog post to go more in depth.

See more
Praveen Mooli
Praveen Mooli
Technical Leader at Taylor and Francis | 11 upvotes 233.2K views
MongoDB Atlas
MongoDB Atlas
Java
Java
Spring Boot
Spring Boot
Node.js
Node.js
ExpressJS
ExpressJS
Python
Python
Flask
Flask
Amazon Kinesis
Amazon Kinesis
Amazon Kinesis Firehose
Amazon Kinesis Firehose
Amazon SNS
Amazon SNS
Amazon SQS
Amazon SQS
AWS Lambda
AWS Lambda
Angular 2
Angular 2
RxJS
RxJS
GitHub
GitHub
Travis CI
Travis CI
Terraform
Terraform
Docker
Docker
Serverless
Serverless
Amazon RDS
Amazon RDS
Amazon DynamoDB
Amazon DynamoDB
Amazon S3
Amazon S3
#Backend
#Microservices
#Eventsourcingframework
#Webapps
#Devops
#Data

We are in the process of building a modern content platform to deliver our content through various channels. We decided to go with Microservices architecture as we wanted scale. Microservice architecture style is an approach to developing an application as a suite of small independently deployable services built around specific business capabilities. You can gain modularity, extensive parallelism and cost-effective scaling by deploying services across many distributed servers. Microservices modularity facilitates independent updates/deployments, and helps to avoid single point of failure, which can help prevent large-scale outages. We also decided to use Event Driven Architecture pattern which is a popular distributed asynchronous architecture pattern used to produce highly scalable applications. The event-driven architecture is made up of highly decoupled, single-purpose event processing components that asynchronously receive and process events.

To build our #Backend capabilities we decided to use the following: 1. #Microservices - Java with Spring Boot , Node.js with ExpressJS and Python with Flask 2. #Eventsourcingframework - Amazon Kinesis , Amazon Kinesis Firehose , Amazon SNS , Amazon SQS, AWS Lambda 3. #Data - Amazon RDS , Amazon DynamoDB , Amazon S3 , MongoDB Atlas

To build #Webapps we decided to use Angular 2 with RxJS

#Devops - GitHub , Travis CI , Terraform , Docker , Serverless

See more
Joseph Kunzler
Joseph Kunzler
DevOps Engineer at Tillable | 9 upvotes 38K views
atTillableTillable
Amazon S3
Amazon S3
Amazon EC2
Amazon EC2
AWS Elastic Load Balancing (ELB)
AWS Elastic Load Balancing (ELB)
AWS CloudFormation
AWS CloudFormation
Terraform
Terraform

We use Terraform because we needed a way to automate the process of building and deploying feature branches. We wanted to hide the complexity such that when a dev creates a PR, it triggers a build and deployment without the dev having to worry about any of the 'plumbing' going on behind the scenes. Terraform allows us to automate the process of provisioning DNS records, Amazon S3 buckets, Amazon EC2 instances and AWS Elastic Load Balancing (ELB)'s. It also makes it easy to tear it all down when finished. We also like that it supports multiple clouds, which is why we chose to use it over AWS CloudFormation.

See more
Pedro Arnal Puente
Pedro Arnal Puente
CTO at La Cupula Music SL | 7 upvotes 71.2K views
atLa Cupula Music SLLa Cupula Music SL
Debian
Debian
Amazon EC2
Amazon EC2
Amazon S3
Amazon S3
Amazon RDS for Aurora
Amazon RDS for Aurora
Redis
Redis
Amazon ElastiCache
Amazon ElastiCache
Terraform
Terraform
Packer
Packer
Ansible
Ansible

Our base infrastructure is composed of Debian based servers running in Amazon EC2 , asset storage with Amazon S3 , and Amazon RDS for Aurora and Redis under Amazon ElastiCache for data storage.

We are starting to work in automated provisioning and management with Terraform , Packer , and Ansible .

See more
Sebastian G臋bski
Sebastian G臋bski
CTO at Shedul/Fresha | 6 upvotes 59.7K views
atFresha EngineeringFresha Engineering
Docker
Docker
Docker Compose
Docker Compose
Kubernetes
Kubernetes
Terraform
Terraform
Ansible
Ansible
Amazon EC2
Amazon EC2
Amazon EKS
Amazon EKS
Amazon S3
Amazon S3
Amazon RDS
Amazon RDS

Heroku was a decent choice to start a business, but at some point our platform was too big, too complex & too heterogenic, so Heroku started to be a constraint, not a benefit. First, we've started containerizing our apps with Docker to eliminate "works in my machine" syndrome & uniformize the environment setup. The first orchestration was composed with Docker Compose , but at some point it made sense to move it to Kubernetes. Fortunately, we've made a very good technical decision when starting our work with containers - all the container configuration & provisions HAD (since the beginning) to be done in code (Infrastructure as Code) - we've used Terraform & Ansible for that (correspondingly). This general trend of containerisation was accompanied by another, parallel & equally big project: migrating environments from Heroku to AWS: using Amazon EC2 , Amazon EKS, Amazon S3 & Amazon RDS.

See more

Terraform's Features

  • Infrastructure as Code: Infrastructure is described using a high-level configuration syntax. This allows a blueprint of your datacenter to be versioned and treated as you would any other code. Additionally, infrastructure can be shared and re-used.
  • Execution Plans: Terraform has a "planning" step where it generates an execution plan. The execution plan shows what Terraform will do when you call apply. This lets you avoid any surprises when Terraform manipulates infrastructure.
  • Resource Graph: Terraform builds a graph of all your resources, and parallelizes the creation and modification of any non-dependent resources. Because of this, Terraform builds infrastructure as efficiently as possible, and operators get insight into dependencies in their infrastructure.
  • Change Automation: Complex changesets can be applied to your infrastructure with minimal human interaction. With the previously mentioned execution plan and resource graph, you know exactly what Terraform will change and in what order, avoiding many possible human errors

Terraform Alternatives & Comparisons

What are some alternatives to Terraform?
Ansible
Ansible is an IT automation tool. It can configure systems, deploy software, and orchestrate more advanced IT tasks such as continuous deployments or zero downtime rolling updates. Ansible鈥檚 goals are foremost those of simplicity and maximum ease of use.
Kubernetes
Kubernetes is an open source orchestration system for Docker containers. It handles scheduling onto nodes in a compute cluster and actively manages workloads to ensure that their state matches the users declared intentions.
Packer
Packer automates the creation of any type of machine image. It embraces modern configuration management by encouraging you to use automated scripts to install and configure the software within your Packer-made images.
Cloud Foundry
Cloud Foundry is an open platform as a service (PaaS) that provides a choice of clouds, developer frameworks, and application services. Cloud Foundry makes it faster and easier to build, test, deploy, and scale applications.
Pulumi
Pulumi is a cloud development platform that makes creating cloud programs easy and productive. Skip the YAML and just write code. Pulumi is multi-language, multi-cloud and fully extensible in both its engine and ecosystem of packages.
See all alternatives

Terraform's Followers
1621 developers follow Terraform to keep up with related blogs and decisions.
oussama siharde
Tristan Gilford
Tobias Bielohlawek
ken okamura
Scott Brinkmeyer
Chris Stevens
Matthew Litwin
Ippei Ogiwara
Morgan W
vchasabe