Getting Started with Terraform - Second Edition

Getting Started with Terraform - Second Edition

Manage production infrastructure as a code

暂无评价综合评分的显示会考虑用户真实性等多项因素,每部作品出现综合评分的时间不定。

作品简介

Key Features

An up-to-date and comprehensive resource on Terraform that lets you quickly and efficiently launch your infrastructure

Learn how to implement your infrastructure as code and make secure, effective changes to your infrastructure

Learn to build multi-cloud fault-tolerant systems and simplify the management and orchestration of even the largest scale and most complex cloud infrastructures

Book Description

Terraform is a tool used to efficiently build, configure, and improve the production infrastructure. It can manage the existing infrastructure as well as create custom in-house solutions.

This book shows you when and how to implement infrastructure as a code practices with Terraform. It covers everything necessary to set up the complete management of infrastructure with Terraform, starting with the basics of using providers and resources. It is a comprehensive guide that begins with very small infrastructure templates and takes you all the way to managing complex systems, all using concrete examples that evolve over the course of the book. The book ends with the complete workflow of managing a production infrastructure as code—this is achieved with the help of version control and continuous integration. The readers will also learn how to combine multiple providers in a single template and manage different code bases with many complex modules. It focuses on how to set up continuous integration for the infrastructure code.

The readers will be able to use Terraform to build, change, and combine infrastructure safely and efficiently.

Kirill Shirinkin is an IT consultant who focuses on Cloud technologies and DevOps practices. He has worked in companies of different sizes and areas, from an online language learning leader to a major IT provider for the global travel industry and one of the largest management consultancies. He is also a cofounder of online mentorship platform mkdev.me, where he leads a team and teaches his students all about DevOps.

作品目录

  1. Getting Started with Terraform
  2. Preface
  3. What this book covers
  4. What you need for this book
  5. Who this book is for
  6. Conventions
  7. Reader feedback
  8. Customer support
  9. Downloading the example code
  10. Downloading the color images of this book
  11. Errata
  12. Piracy
  13. Questions
  14. Infrastructure Automation
  15. What is Infrastructure as Code and why is it needed?
  16. Declarative versus procedural tools for Infrastructure as Code
  17. Infrastructure as Code in the Cloud
  18. Requirements for infrastructure provisioner
  19. Supports a wide variety of services
  20. Idempotency
  21. Dependency resolution
  22. Robust integration with existing tools
  23. Platform agnosticism
  24. Smart update management
  25. Ease of extension
  26. Which tools exist for infrastructure provisioning?
  27. Scripting
  28. Configuration management
  29. CloudFormation/Heat
  30. Terraform
  31. A short overview of Terraform
  32. Journey ahead and how to read this book
  33. Summary
  34. Deploying First Server
  35. History of Terraform
  36. Preparing work environment
  37. The many Terraform providers
  38. Short introduction to AWS
  39. Using Elastic Compute Cloud
  40. Creating an instance through the Management Console
  41. Creating an instance with AWS CLI
  42. Configuring AWS provider
  43. Static credentials
  44. Environment variables
  45. Credentials file
  46. Creating an EC2 instance with Terraform
  47. Working with state
  48. Handling resource updates
  49. Destroying everything we've built
  50. Summary
  51. Resource Dependencies and Modules
  52. Creating an AWS Virtual Private Cloud
  53. Understanding dependency graph
  54. Playing with Terraform graphs
  55. Controlling dependencies with depends_on and ignore_changes
  56. Making sense of our template
  57. Removing duplication with modules
  58. Configuring modules
  59. Retrieving module data with outputs
  60. Using root module outputs
  61. Summary
  62. Storing and Supplying Configuration
  63. Understanding variables
  64. Using map variables
  65. Using list variables
  66. Supplying variables inline
  67. Using Terraform environment variables
  68. Using variable files
  69. Configuring data sources
  70. Providing configuration with template_file
  71. Providing data from anywhere with external_data
  72. Exploring Terraform configuration resources
  73. Taking a quick look at Consul
  74. Summary
  75. Connecting with Other Tools
  76. Returning data with outputs
  77. Testing servers with Inspec
  78. Provisioners
  79. Provisioning with local-exec and Ansible
  80. Provisioning with Chef
  81. Provisioning with remote-exec and Puppet
  82. Uploading files with a file provisioner
  83. Reprovisioning machines with null_resource
  84. Using third-party plugins
  85. Summary
  86. Scaling and Updating Infrastructure
  87. Counting servers
  88. Bringing in high availability
  89. Load balancing and simulating conditionals
  90. Immutable infrastructure
  91. Baking images with Packer
  92. Rolling out AMI upgrades with Terraform
  93. Performing blue-green deployments
  94. Refreshing infrastructure
  95. Importing resources
  96. Summary
  97. Collaborative Infrastructure
  98. Version control with Git 101
  99. Moving templates to Git
  100. Protecting secrets in a Git repository
  101. Storing state files remotely
  102. Connecting remote states together
  103. Storing modules remotely
  104. Locking state files with Terragrunt
  105. Moving infrastructure updates to the CI pipeline
  106. Integration testing of Terraform modules
  107. Summary
  108. Future of Terraform
  109. Infrastructure as code and Terraform replacements
  110. Learning AWS and compiling Terraform
  111. Learning Consul
  112. Provisioning and configuration management
  113. Immutable infrastructure
  114. Collaboration and CI/CD
  115. The many tools around Terraform
  116. The rapid development of Terraform
  117. Closing thoughts on the future of Terraform
  118. Summary