HashiCorp Infrastructure Automation Certification Guide
eBook - ePub

HashiCorp Infrastructure Automation Certification Guide

Pass the Terraform Associate exam and manage IaC to scale across AWS, Azure, and Google Cloud

  1. 350 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

HashiCorp Infrastructure Automation Certification Guide

Pass the Terraform Associate exam and manage IaC to scale across AWS, Azure, and Google Cloud

Book details
Book preview
Table of contents
Citations

About This Book

Leverage Terraform's capabilities to reuse code, write modules, automate deployments, and manage infrastructure state

Key Features

  • Perform complex enterprise-grade infrastructure deployments using Terraform v1.0, the latest version of Terraform
  • Learn to scale your infrastructure without introducing added deployment complexities
  • Understand how to overcome infrastructure deployment challenges

Book Description

Terraform is a highly sought-after technology for orchestrating infrastructure provisioning. This book is a complete reference guide to enhancing your infrastructure automation skills, offering up-to-date coverage of the HashiCorp infrastructure automation certification exam. This book is written in a clear and practical way with self-assessment questions and mock exams that will help you from a HashiCorp infrastructure automation certification exam perspective. This book covers end-to-end activities with Terraform, such as installation, writing its configuration file, Terraform modules, backend configurations, data sources, and infrastructure provisioning. You'll also get to grips with complex enterprise infrastructures and discover how to create thousands of resources with a single click. As you advance, you'll get a clear understanding of maintaining infrastructure as code (IaC) in Repo/GitHub, along with learning how to create, modify, and remove infrastructure resources as and when needed. Finally, you'll learn about Terraform Cloud and Enterprise and their enhanced features.

By the end of this book, you'll have a handy, up-to-date desktop reference guide along with everything you need to pass the HashiCorp Certified: Terraform Associate exam with confidence.

What you will learn

  • Effectively maintain the life cycle of your infrastructure using Terraform 1.0
  • Reuse Terraform code to provision any cloud infrastructure
  • Write Terraform modules on multiple cloud providers
  • Use Terraform workflows with the Azure DevOps pipeline
  • Write Terraform configuration files for AWS, Azure, and Google Cloud
  • Discover ways to securely store Terraform state files
  • Understand Policy as Code using Terraform Sentinel
  • Gain an overview of Terraform Cloud and Terraform Enterprise

Who this book is for

This book is for experienced cloud engineers, DevOps engineers, system administrators, and solution architects interested in developing industry-grade skills with Terraform. You will also find this book useful if you want to pass the HashiCorp Certified: Terraform Associate exam. Basic command-line skills and prior knowledge of cloud environments and their services are required before getting started with this book.

Frequently asked questions

Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access HashiCorp Infrastructure Automation Certification Guide by Ravi Mishra in PDF and/or ePUB format, as well as other popular books in Computer Science & Software Development. We have over one million books available in our catalogue for you to explore.

Information

Year
2021
ISBN
9781800560888
Edition
1

Section 1: The Basics

Section 1 aims to introduce you to the basics of Infrastructure as Code (IaC), comparing other IaC options such as ARM templates and AWS CloudFormation to Terraform and how Terraform can be used to provision infrastructure. You will also get an understanding of how Terraform can be set up on a local system.
The following chapters will be covered under this section:
  • Chapter 1, Getting to Know IaC
  • Chapter 2, Terraform Installation Guide

Chapter 1: Getting to Know IaC

In this chapter, we are going to discuss what Infrastructure as Code (IaC) is in detail. We will be discussing the benefits of using IaC. Furthermore, we will start describing the basics of Terraform, and then undertake a comparison of Terraform with other available IaC options, including AWS CloudFormation, Azure Resource Manager (ARM), and Google Cloud Deployment Manager. Moving on, we will then discuss Terraform architecture.
Throughout this chapter, we will be focusing on Terraform for major cloud providers, including GCP, AWS, and Azure. The whole chapter will help you in terms of achieving a fair understanding of Terraform (IaC) and how you can overcome the old lego system of executing manual changes to your environment. This will help you get an idea of how you can start using Terraform for infrastructure automation in your organization.
The following topics will be covered in this chapter:
  • Introduction to IaC
  • Advantages of IaC
  • Introduction to Terraform
  • A comparison with other IaC
  • An understanding of Terraform architecture

Technical requirements

To follow along with this chapter, you need to have a basic knowledge of different IaC options, including ARM templates and AWS CloudFormation, while a basic knowledge of major cloud providers, such as GCP, AWS, and Azure, will be beneficial.

Introduction to IaC

Before learning about Terraform, let's try to understand what it basically means for us and how it helps make users' lives easier in the IT industry. The first thing that always comes to consumers' minds is that when they need an IT infrastructure, for example, if they want a virtual machine, they need to raise a ticket on some ticket portal such as ServiceNow, and someone from the backend would log in to that ticketing portal and take that ticket from the queue and deploy the virtual machine for the consumer, either in VMware or a HyperV environment through the management portal using some click jobs. That is the traditional approach for infrastructure deployment, which is somewhat fine if they need to manage infrastructure in their private data center and there is very little possibility of performing scaling of those deployed resources, which means once it gets provisioned, after that no one is requesting further changes to the created resource.
In all these cases, it is fine if they easily go ahead and perform all the operations manually but what about if they need to deploy a very large infrastructure consisting of more repeatable work in the cloud? Then it would be a really tedious job for the administrator to provision those resources manually and also it is a very time-consuming job for them. So, to overcome this challenging situation, most cloud vendors have come up with an approach of IaC, which is mostly an API-driven approach. Most cloud vendors have published APIs for all their resources. Using that API, we can easily get the resource deployed in the cloud.
Nowadays, as most customers are moving toward the cloud, and as we all know, cloud platforms provide us with more elasticity and scalability in terms of their infrastructure, this means you can easily utilize the resources and pay for what you use; you don't need to pay anything extra. Just think down the line of an administrator needing to perform the scaling up and down of resources and how difficult it would be for them. Let's suppose there are 1,000 resources that need to be scaled up during the day and scaled down at night.
In this case, consumers need to raise 1,000 tickets for performing the scale-up and again 1,000 more tickets for scaling down, which means by the end of the day, the system administrator who is managing the infrastructure will get flooded with so many requests and it would be really impossible for them to handle this. So, here we have something called IaC, which is a way of deploying or managing the infrastructure in an automated way. All the resources that need to be managed will be defined in code format and we can keep that code in any source control repository, such as GitHub or Bitbucket. Later, we can apply a DevOps approach to manage our infrastructure easily. There are many advantages of using IaC; we are going to discuss a few of them.

Advantages of IaC

Let's discuss a few of the advantages of using IaC.

Simple and speedy

Using IaC, you would able to spin up a complete infrastructure architecture by simply running a script.
Suppose you need to deploy infrastructure in multiple environments, such as development, test, preproduction, and production. It would be very easy for you to provision it with just a single click. Not only this, but say you need to deploy the same sort of infrastructure environments in other regions where your cloud provider supports backup and disaster recovery.
You can do all this by writing simple lines of code.

Configuration consistency

The classical approach of infrastructure deployment is very ugly because the infrastructure is provisioned and managed using a manual approach that helps to maintain some consistency in the infrastructure deployment process. But it always introduces human error, which makes it difficult to perform any sort of debugging.
IaC standardizes the process of building and managing the infrastructure so that the possibility of any errors or deviations is reduced. Definitely, this will decrease any incompatibility issues with the infrastructure and it will help you to run your application smoothly.

Risk minimization

When we were managing infrastructure manually, it was observed that only a handful of Subject Matter Experts (SMEs) knew how to do it and the rest of the team members remained blank, which introduces dependency and security risks for the organization. Just think of a situation where the person who is responsible for managing the complete infrastructure leaves the organization; that means whatever they knew they might not have shared with others or they may not have updated the documents. At the end of the day, risk has been introduced to the organization because that employee is leaving. Many times, in such cases, the organization needs to undergo some reverse engineering to fix any issues.
This challenging situation can be controlled by using IaC for the infrastructure. IaC will not only automate the process, but it also serves as a form of documentation for your infrastructure and provides insurance to the company in cases where employees leave the company with institutional knowledge. As you know, we generally keep IaC to source control tools such as Azure Repos or GitHub. So, if anyone makes any configuration changes to the infrastructure, they will get recorded in the source control repository. So, if anyone leaves or goes on vacation, it won't impact the manageability of the infrastructure because the version control tool will have kept track of the changes that have been performed on the inf...

Table of contents

  1. HashiCorp Infrastructure Automation Certification Guide
  2. Contributors
  3. Preface
  4. Section 1: The Basics
  5. Chapter 1: Getting to Know IaC
  6. Chapter 2: Terraform Installation Guide
  7. Section 2: Core Concepts
  8. Chapter 3: Getting Started with Terraform
  9. Chapter 4: Deep Dive into Terraform
  10. Chapter 5: Terraform CLI
  11. Chapter 6: Terraform Workflows
  12. Chapter 7: Terraform Modules
  13. Section 3: Managing Infrastructure with Terraform
  14. Chapter 8: Terraform Configuration Files
  15. Chapter 9: Understanding Terraform Stacks
  16. Chapter 10: Terraform Cloud and Terraform Enterprise
  17. Chapter 11: Terraform Glossary
  18. Assessments
  19. Other Books You May Enjoy