<story><title>Terraform Gotchas and How We Work Around Them</title><url>http://heap.engineering/terraform-gotchas/</url></story><parent_chain><item><author>7ewis</author><text>Terraform has interested me for a while, and I&amp;#x27;ve been meaning to give it a try, but haven&amp;#x27;t had a chance just yet.&lt;p&gt;From what I have seen so far though, there isn&amp;#x27;t &lt;i&gt;really&lt;/i&gt; that much difference&amp;#x2F;benefit over CloudFormation. We currently have 95% of our resources in AWS with about 4% in Azure, and 1% in Google Cloud. It&amp;#x27;s great that Terraform is &amp;#x27;mulit-cloud&amp;#x27; but it still seems like you have to write .tf&amp;#x27;s catered to each cloud, you can&amp;#x27;t just lift and shift to another cloud by copying and pasting a file?&lt;p&gt;People say the &amp;#x27;plan&amp;#x27; feature is one of the advantages over CFN, but as far as I can tell, CFN now offers the same feature... it tells you what&amp;#x27;s going to change when you upload  a new stack.&lt;p&gt;I sound like a CFN advocate now, but I genuinely don&amp;#x27;t have &lt;i&gt;that&lt;/i&gt; much experience with it, and really do want to give Terraform a chance. Convince me?&lt;p&gt;&lt;i&gt;Oh, and since CFN started supporing YAML it looks easier to write too&lt;/i&gt;</text></item></parent_chain><comment><author>kjhosein</author><text>I&amp;#x27;ve been thru the CFN v TF question. We came up with a list of benefits of TF over CFN. (Yes, I know - one-sided, but we wanted to document the decision with a bit more substance than &amp;quot;oh it&amp;#x27;s just better&amp;quot;)&lt;p&gt;&lt;pre&gt;&lt;code&gt;  * Ability to separate data (variables&amp;#x2F;parameters) from configs.
  * Easier to read (well at least pre-YAML CFN). 
  * Allows comments in the code.
  * Version control changes (diffs) are easier to read.
  * Multi-Cloud support. Works against AWS, Google Compute, Azure, Docker, more.
  * Multi-provider in general: can provision resources across multiple different cloud providers at once.
  * Can write modules in TF that can be reused in multiple different configs.
  * Tracks state via a version-controllable data file.
  * &amp;#x27;terraform plan&amp;#x27; is essentially a no-op mode to see what changes would occur without actual running or making changes.
  * Actively developed.&lt;/code&gt;&lt;/pre&gt;</text></comment>
<story><title>Terraform Gotchas and How We Work Around Them</title><url>http://heap.engineering/terraform-gotchas/</url></story><parent_chain><item><author>7ewis</author><text>Terraform has interested me for a while, and I&amp;#x27;ve been meaning to give it a try, but haven&amp;#x27;t had a chance just yet.&lt;p&gt;From what I have seen so far though, there isn&amp;#x27;t &lt;i&gt;really&lt;/i&gt; that much difference&amp;#x2F;benefit over CloudFormation. We currently have 95% of our resources in AWS with about 4% in Azure, and 1% in Google Cloud. It&amp;#x27;s great that Terraform is &amp;#x27;mulit-cloud&amp;#x27; but it still seems like you have to write .tf&amp;#x27;s catered to each cloud, you can&amp;#x27;t just lift and shift to another cloud by copying and pasting a file?&lt;p&gt;People say the &amp;#x27;plan&amp;#x27; feature is one of the advantages over CFN, but as far as I can tell, CFN now offers the same feature... it tells you what&amp;#x27;s going to change when you upload  a new stack.&lt;p&gt;I sound like a CFN advocate now, but I genuinely don&amp;#x27;t have &lt;i&gt;that&lt;/i&gt; much experience with it, and really do want to give Terraform a chance. Convince me?&lt;p&gt;&lt;i&gt;Oh, and since CFN started supporing YAML it looks easier to write too&lt;/i&gt;</text></item></parent_chain><comment><author>dantiberian</author><text>Here&amp;#x27;s a real-world benefit I had over the weekend. I&amp;#x27;ve been using Terraform for a Google Cloud project, and was coming to setting up DNS records. I wanted to have dual DNS providers for redundancy. With Terraform, it was trivial, as I just added a second Terraform resource for DNSimple (with Google Cloud DNS as my &amp;#x27;main&amp;#x27; DNS resource).&lt;p&gt;The beauty of Terraform is that you can orchestrate all of your infrastructure, not just the stuff in one stack. If you&amp;#x27;ve got 95%&amp;#x2F;4%&amp;#x2F;1% in AWS&amp;#x2F;Azure&amp;#x2F;GCP, how do you manage&amp;#x2F;reference the non-AWS resources? Terraform gives you a unified way to reference and link cross-infrastructure resources.</text></comment>