Reader small image

You're reading from  Architecting AWS with Terraform

Product typeBook
Published inDec 2023
PublisherPackt
ISBN-139781803248561
Edition1st Edition
Right arrow
Author (1)
Erol Kavas
Erol Kavas
author image
Erol Kavas

Erol Kavas has worked in the IT industry for more than 20 years, with 10 years dedicated to infrastructure, the cloud, and DevOps. He has helped many Canadian and US enterprises and governments to build their cloud foundations and embark upon their containerization and Kubernetes journeys. He is fully certified on AWS, Azure, Google Cloud Platform, and Kubernetes in all disciplines. He is a partner and chief consultant in a DevOps and cloud consulting firm that helps Canadian and US start-ups in their cloud and DevOps journeys. He is also a Microsoft Certified Trainer (MCT) regional lead for Canada and trains many new cloud professionals at CloudCamp.
Read more about Erol Kavas

Right arrow

How Not to Use IaC and Terraform

Infrastructure as Code (IaC) tools such as Terraform have revolutionized the way we manage cloud infrastructure, offering powerful capabilities for automating the deployment and configuration of complex environments. However, despite the benefits, there are still many situations where IaC and Terraform can be misused or overused, leading to inefficiencies, errors, and security vulnerabilities.

In this chapter, we’ll explore some basic Terraform commands, then compare Terraform and CloudFormation.

We’ll cover these main topics in this chapter:

  • Terraform architecture and workflow
  • To compare with the others

Terraform architecture and workflow

To make the most of Terraform and use it effectively to manage your cloud infrastructure, it’s important to have a good understanding of its architecture and workflow. Terraform follows a declarative approach to infrastructure management, where you describe the desired state of your infrastructure using configuration files, and it takes care of provisioning and configuring the necessary resources to achieve that state.

In this chapter, we’ll explore the key components of Terraform’s architecture and workflow, and provide a high-level overview of how Terraform works to manage infrastructure on cloud platforms such as AWS, Azure, and Google Cloud. Understanding these concepts will help you write more effective Terraform code and troubleshoot issues more easily.

Architecture

Terraform is a tool that allows developers to describe the infrastructure and run it in any environment. Terraform has many use cases, such as building...

To Compare with the Other IaC Tools

Terraform’s flexible abstraction of resources and providers allows it to represent a wide range of infrastructure components, from physical hardware and virtual machines to email and DNS providers. This versatility makes Terraform capable of addressing various issues.

Terraform can manage virtually any cloud or virtual environment, including AWS, Microsoft Azure, and Google Cloud Platform, among others.

While this chapter focuses on using Terraform to manage AWS infrastructure, it is essential to note that Terraform is not exclusive to only cloud platforms. It can manage a single application or an entire data center.

Terraform versus CloudFormation

When it comes to IaC tools for cloud-based resources, two of the most popular choices are Terraform and AWS CloudFormation. While both tools aim to provide a reliable, efficient, and safe way to manage cloud infrastructure, they differ in their approach and implementation. Terraform...

Summary

This chapter provided an overview of Terraform and its architecture and workflow, as well as a comparison between Terraform and CloudFormation. Terraform is a popular IaC tool that allows for safe and efficient management of infrastructure across multiple cloud providers. It relies on plugins called providers to interact with cloud providers, SaaS providers, and other APIs. Terraform uses modules to organize and encapsulate configurations into logical components, making it easier to navigate and understand complex configurations. Using modules can also provide consistency in your configurations and make them easier for other teams to use. Terraform uses resource blocks to manage infrastructure objects in your configuration, with most providers having several different resources that map to the appropriate APIs to manage that infrastructure type. The workflow of Terraform consists of five key steps: Write, Init, Plan, Apply, and Destroy.

The chapter also compared Terraform...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Architecting AWS with Terraform
Published in: Dec 2023Publisher: PacktISBN-13: 9781803248561
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime

Author (1)

author image
Erol Kavas

Erol Kavas has worked in the IT industry for more than 20 years, with 10 years dedicated to infrastructure, the cloud, and DevOps. He has helped many Canadian and US enterprises and governments to build their cloud foundations and embark upon their containerization and Kubernetes journeys. He is fully certified on AWS, Azure, Google Cloud Platform, and Kubernetes in all disciplines. He is a partner and chief consultant in a DevOps and cloud consulting firm that helps Canadian and US start-ups in their cloud and DevOps journeys. He is also a Microsoft Certified Trainer (MCT) regional lead for Canada and trains many new cloud professionals at CloudCamp.
Read more about Erol Kavas