How to manage Terraform state

<p>This is Part 3 of the&nbsp;<a href="https://blog.gruntwork.io/a-comprehensive-guide-to-terraform-b3d32832baca#.b6sun4nkn" rel="noopener ugc nofollow" target="_blank">Comprehensive Guide to Terraform</a>&nbsp;series. In Part 1, you learned&nbsp;<a href="https://blog.gruntwork.io/why-we-use-terraform-and-not-chef-puppet-ansible-saltstack-or-cloudformation-7989dad2865c#.63ls7fpkq" rel="noopener ugc nofollow" target="_blank">why we picked Terraform as our IAC tool of choice and not Chef, Puppet, Ansible, Pulumi, or CloudFormation</a>. In Part 2, you got started with the&nbsp;<a href="https://blog.gruntwork.io/an-introduction-to-terraform-f17df9c6d180" rel="noopener ugc nofollow" target="_blank">basic syntax and features of Terraform and used them to deploy a cluster of web servers on AWS</a>. In this post, you&rsquo;ll learn about how Terraform manages state and the impact that has on file layout, isolation, and locking in a Terraform project.</p> <p>Here are the topics we&rsquo;ll cover:</p> <ol> <li><a href="https://blog.gruntwork.io/how-to-manage-terraform-state-28f5697e68fa#0054" rel="noopener ugc nofollow">What is Terraform state?</a></li> <li><a href="https://blog.gruntwork.io/how-to-manage-terraform-state-28f5697e68fa#aeb7" rel="noopener ugc nofollow">Shared storage for state files</a></li> <li><a href="https://blog.gruntwork.io/how-to-manage-terraform-state-28f5697e68fa#01db" rel="noopener ugc nofollow">Limitations with Terraform&rsquo;s Backends</a></li> <li><a href="https://blog.gruntwork.io/how-to-manage-terraform-state-28f5697e68fa#784f" rel="noopener ugc nofollow">Isolating state files</a></li> <li><a href="https://blog.gruntwork.io/how-to-manage-terraform-state-28f5697e68fa#7077" rel="noopener ugc nofollow">The terraform_remote_state data source</a></li> </ol> <p>You can find working sample code for the examples in this blog post in the&nbsp;<a href="https://github.com/brikis98/terraform-up-and-running-code" rel="noopener ugc nofollow" target="_blank"><em>Terraform: Up &amp; Running&nbsp;</em>code samples repo</a>. This blog post corresponds to Chapter 3 of&nbsp;<em>Terraform Up &amp; Running</em>, &ldquo;How to Manage Terraform State,&rdquo; so look for the code samples in the&nbsp;<code>03-terraform-state</code>&nbsp;folders.</p> <p><a href="https://blog.gruntwork.io/how-to-manage-terraform-state-28f5697e68fa"><strong>Learn More</strong></a></p>