r/cloudcomputing • • Mar 24 '20

terraform or cloudformation

hi guys, i suppose you have come around these tools for deployments.
which one should a DevOps beginner look into first and why ? any further comments appreciated.

thanks
Mattt

13 Upvotes

8 comments sorted by

5

u/another-smith Mar 24 '20

As a beginner looking for something to learn I'd recommend terraform, if like me you're working for a company the soley uses aws I'd look into cf or aws cdk

3

u/Singularity42 Mar 24 '20

In my experience Cloudformation starts having issues as soon as you move past a very simple case.

As soon as you want anything beyond a completely basic scenario (e.g. differences in different environments or larger than a few services worth of stuff) I would recommend Terraform.

Surprisingly, Terraform also tends to support more of AWS than Cloudformation does. I am guessing because it is open source, so as soon as something is missing, someone adds it.

2

u/[deleted] Mar 24 '20

Terraform no question. I turn down jobs where they would want me to use cloud formation because it’s everything I hate in a tool.

1

u/[deleted] Mar 24 '20

CloudFormation all the way. Not having to deal with another layer of abstraction is helpful. And it’s a lot easier to use than CDK.

1

u/betterthananoob Mar 24 '20 edited Mar 24 '20

Honestly I would say it would take you 2-3 days to explore each. I mean in a day you can cover basics of Cloudformation and spin up/down EC2 instances. Another 2 days for Terraform. I would say stick to terraform but start with cloudformation first.

Another aspect is that, it would depend on your business needs. Some companies are completely AWS based whereas others have multiple cloud environments. If the company is based on the latter, you ought to have terraform as it isn't vendor specific due to which Infra provisioning happens smoothly without any extra need for any other IaC tools.

1

u/osiris_papyrus Mar 24 '20

Many tools transpile to cloudformation, like an assembly language. The concepts are primitives from which many other tools build off of, so starting there would be the best bet.

1

u/stikko Mar 24 '20

CloudFormation if you love Java. Terraform if you love Go.

If you love neither I'd default to Terraform.

  • It's more flexible in terms of where it's being run and services it can interact with out of the box. This starts to become important as you start to deal with internal services that you may not want to expose publicly for CloudFormation to be able to interact with.

  • You can deploy CloudFormation stacks using Terraform but not the other way around.

  • The HCL that Terraform uses has constructs that CloudFormation just doesn't support.

-2

u/ahandle Mar 24 '20

You want to stay as close to the core concepts as possible.

AWS actively prevents it.