6

Terraform Hands-On - Part 1 | Introduction to Terraform & AWS

 9 months ago
source link: https://devm.io/aws/aws-terraform-intro-1-001
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Part 1

Terraform Hands-On - Part 1 | Introduction to Terraform & AWS


Cloud computing has emerged as a game-changer in enabling digital transformation, granting organizations instant access to an extensive range of resources and services on-demand. Efficient provisioning of scalable infrastructure is crucial for businesses to rapidly deliver applications and services in the cloud. Because traditional manual processes often lead to inconsistencies and errors, infrastructure as code (IaC) emerged as a powerful approach to automate and manage infrastructure deployments. The open-source tool Terraform has become immensely popular to provision infrastructure in the cloud due to its simplicity, flexibility, and broad support for multiple cloud providers.

This article introduces the reader to Terraform and how it can be used to deploy IaC on AWS. Readers gain practical experience in leveraging Terraform’s capabilities for provisioning and managing AWS resources. The article covers essential concepts like resource definitions, modules, variables, and Terraform commands. By the end, the reader will be equipped to deploy a serverless API using Terraform on AWS that features an HTTP API alongside a compute and storage layer.

AWS is the world’s most comprehensive and broadly adopted cloud, offering over 200 fully featured services from data centers globally. Millions of customers—including the fastest-growing startups, largest enterprises, and leading government agencies—are using AWS to lower costs, become more agile, and innovate faster.

AWS provides a range of IaC tools to automate infrastructure deployments, each with its own set of advantages. CloudFormation is a service provided by AWS that allows you to create and manage AWS resources using JSON or YAML templates. CDK, or AWS Cloud Development Kit, is a software development framework that allows you to define cloud infrastructure using familiar programming languages like Python or TypeScript. In this article, we will focus on Terraform, a widely adopted open-source IaC tool.

As well as the aforementioned technologies, resources and services on AWS can be automatically provisioned using Terraform. It is an open-source IaC tool created by HashiCorp. Terraform provides modules for vendor specific APIs, including AWS, Microsoft Azure, Google Cloud Platform, as well as classical infrastructure providers such as vSphere or OpenStack. HashiCorps Configuration Language (HCL) allows engineers to write IaC for different platforms using a common markup language. Thanks to Terraform’s plan-and-apply workflow, changes to infrastructure are reviewed before implementation, minimising the risk of errors and providing an opportunity to validate changes. In addition, Terraform has a vibrant and active community of contributors and maintainers who collaborate to enhance and extend the capabilities of Terraform by contributing a vast library of provider plugins and modules. These contributions simplify the provisioning of complex infrastructure configurations and promote best practices.

In the upcoming sections, we will delve into the key concepts and structures of Terraform. To provide a practical demonstration, we will guide you through a step-by-step deployment of a serverless application on AWS. This application enables users to securely store and persist their data by leveraging a database through an API.

We will create a serverless application using Terraform. This application will consist of multiple JavaScript-based AWS Lambda function, which is a serverless compute runtime provided by AWS. It allows you to run code without the need to provision or manage servers. Additionally, the application...


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK