We&#x27;re using Consul to store the state remotely (see: <a href="https:&#x2F;&#x2F;terraform.io&#x2F;docs&#x2F;commands&#x2F;remote-config.html" rel="nofollow">https:&#x2F;&#x2F;terraform.io&#x2F;docs&#x2F;commands&#x2F;remote-config.html</a>). In a nutshell, it just stores the JSON it would have stored in the tfstate file in a key in Consul instead. In addition to being easily available in a shared location, this allows you to leverage Consul&#x27;s features (ACLs, watches, etc) to improve the process of making infrastructure changes.<p>Stuff we&#x27;ve thought of but haven&#x27;t gotten around to yet:
- Build relatively simple tooling around terraform and Consul to acquire a lock before running apply...we haven&#x27;t gone to that length yet since only our continuous deployment environment has credentials to mutate production and it runs builds of the infrastructure project sequentially.
- Watching the Consul key where the tfstate is stored for changes to kick off sanity checks to ensure that everything is still healthy.<p>They&#x27;re both so flexible that there&#x27;s probably other ways in which they&#x27;d work well together that we haven&#x27;t thought of yet.