Deep-Dive Terraform on Azure : Automated Delivery and Deployment of Azure Solutions
معرفی کتاب «Deep-Dive Terraform on Azure : Automated Delivery and Deployment of Azure Solutions» نوشتهٔ Alia Trabucco Zerán و Ritesh Modi، منتشرشده توسط نشر Apress : Imprint: Apress در سال 2021. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.
Get started with the foundations of Infrastructure as Code and learn how Terraform can automate the deployment and management of resources on Azure. This book covers all of the software engineering practices related to Terraform and Infrastructure as Code with Azure as a cloud provider. The book starts with an introduction to Infrastructure as Code and covers basic concepts, principles, and tools, followed by an overview of Azure and Terraform that shows you how Terraform can be used to provision and manage Azure resources. You will get started writing multiple Terraform scripts and explore its various concepts. Author Ritesh Modi takes a deep dive into Terraform and teaches you about deployment and multiple resource creation using loops. Writing a reusable script using modules is discussed as well as management and administration of secrets, sensitive data, and passwords within Terraform code. You will learn to store and version Terraform scripts and know how Terraform is used in Azure DevOps pipelines. And you will write unit and integration tests for Terraform and learn its best practices. The book also highlights and walks through the Terraform Azure Provider and shows you a simple way to create a new Terraform provider. After reading this book, you will be able to write quality Terraform scripts that are secure by design, modular, and reusable in Azure. What Will You Learn Understand implementation within infrastructure and application deployments Provision resources in Azure using Terraform Use unit and integration testing Explore concepts such as local vs remote, importing state, workspaces, and backends Who This Book Is For Software engineers, DevOps professionals, and technology architects Table of Contents About the Author About the Technical Reviewer Acknowledgments Introduction Chapter 1: Infrastructure as Code Introduction to IaC Benefits of IaC Faster Release Cycles and High-Quality Delivery Process Dependency, Standardization, and Consistency Predictability and Idempotency Agility and State of Readiness Better Collaboration Between Dev and Operations Compliance to Organization Policies Enables Effective DevOps Terraform as a Means to IaC Summary Chapter 2: Azure and Terraform Terraform Architecture Setting Up the Development Environment Creating a Subscription with the Azure Cloud How Terraform Works Introducing State Writing the First Terraform Configuration Applying a Terraform Configuration to Azure Initialize the Terraform Working Environment in a Folder Containing Configuration Files Validate the Configuration Files for Syntactical Validity and Consistency Reconcile the Local State with the Remote Cloud Infrastructure Using the Refresh Command Generate the Execution Plan to Check What Will Change in the Target Environment Apply the Configuration to the Target Environment Using the apply Command Terraform Authentication to Azure Authentication Using the Azure CLI List of Terraform Commands Used in This Chapter Summary Chapter 3: Getting Started with Terraform Terraform Variables Understanding Terraform Datatypes Working with Lists Working with Maps Working with Objects Working with Sets Working with Tuples Providers Versioning Multiproviders Outputs State Management in Terraform Setting Up Remote State for Terraform Deployments Provision of Remote Azure Storage Infrastructure Configuring the azurerm Provider Configurations Using Remote State Terraform Files Code for variables.tf Code for versions.tf Code for providers.tf Code for locals.tf Code for main.tf Code for outputs.tf Code for values.tfvars Summary Chapter 4: Deep-Dive into Terraform Base Configuration count Splatting terraform destroy count with List Variables Conditional Statements for_each Difference Between for_each and count for_each at the Property Level for Expressions (Input Map – Output Map) for Expressions (Input Map – Output List) String Templating String Interpolation String Directives Terraform Functions Provisioners local-exec Using local-exec in Terraform Configuration File Provisioner remote-exec Summary Chapter 5: Terraform Modules Overview Why Do We Need Modules? Uniformity Reusability Applying Policies Structure of a Module Developing a Module Resource Group Module SQL Server Module Testing a Module Using a Module Publishing Module Nested Modules Module Best Practices Summary Chapter 6: Writing Secure Scripts with Terraform Design-Time Considerations Runtime Considerations Terraform State File Store the State File at a Remote Location Encrypt the State File at Rest State File Access Using SSL/TLS Limited Access to the State File Terraform Variables Using the .tfvars File Using the -var Option Using Environment Variables Provider-Specific Environment Variables Terraform Logs Terraform CLI Secure Terraform Script Authoring Admin Activities Storing Secrets Executing Terraform Admin Script Utilizing Secrets for Remote State Utilizing Secrets in Applications Summary Chapter 7: CI/CD with Terraform Creating the Sample Terraform Project Preparation Build Stages Release/Deployment Stages Summary Chapter 8: Terraform Unit Testing Introduction to Unit Testing Application vs. Infrastructure Unit Testing Introduction to Terratest Writing the First Unit Test Using Terratest Testing Multiple Terraform Resources Generated Using count Testing Multiple Terraform Resources Generated Using for_each Working with Remote State Multiple Subtests Within a Test Parallel Execution Integration Tests Summary Chapter 9: Terraform Best Practices General Input Variables Output Variables Local Variables Versioning Provider Provisioners Lifecycle Testing State Management Module Workspaces Authentication CI/CD Pipeline Summary Index Get started with the foundations of Infrastructure as Code and learn how Terraform can automate the deployment and management of resources on Azure. This book covers all of the software engineering practices related to Terraform and Infrastructure as Code with Azure as a cloud provider. The book starts with an introduction to Infrastructure as Code and covers basic concepts, principles, and tools, followed by an overview of Azure and Terraform that shows you how Terraform can be used to provision and manage Azure resources. You will get started writing multiple Terraform scripts and explore its various concepts. Author Ritesh Modi takes a deep dive into Terraform and teaches you about deployment and multiple resource creation using loops. Writing a reusable script using modules is discussed as well as management and administration of secrets, sensitive data, and passwords within Terraform code. You will learn to store and version Terraform scripts and know how Terraform is used in Azure DevOps pipelines. And you will write unit and integration tests for Terraform and learn its best practices. The book also highlights and walks through the Terraform Azure Provider and shows you a simple way to create a new Terraform provider. After reading this book, you will be able to write quality Terraform scripts that are secure by design, modular, and reusable in Azure. You will: Understand implementation within infrastructure and application deployments Provision resources in Azure using Terraform Use unit and integration testing Explore concepts such as local vs remote, importing state, workspaces, and backends
دانلود کتاب Deep-Dive Terraform on Azure : Automated Delivery and Deployment of Azure Solutions