Hacker News new | ask | show | jobs
by scarface74 2315 days ago
Why would you ever use Terraform over CloudFormation? There are so many parts of AWS that use CF and that you can modify from the getting started templates like CodeStar and exporting a SAM template from your lambda template.

Before someone comments on how TF is “cross platform”, all of the provisioners are vendor specific.

As far as what other services to use, if you are hosting your own services on AWS instead of using AWS manager services, you’re kind of missing the point of AWS.

But a few other services we use all of the time are CodeBuild, ElasticCache (hosted Redis), ElasticSearch, Route 53, load balancers, autoscaling groups, SSM (managing the few “pets” until we can kill them), ECS, ECR, Fargate, SNS, SQS, DynamoDB, SFTP, CloudTrail, Microsoft AD, we are experimenting with the recently announced Device Farm/Selenium service, step functions, Athena, Secrets Manager, and a few more I’m probably forgetting.

1 comments

> Why would you ever use Terraform over CloudFormation?

1. You're using Terraform already for resources outside of AWS (cdn, monitoring, dns, anything else) and want to stay with a common tech.

2. You're running into cases that CF doesn't support and have to generate your descriptions externally, or use sparkleformation hacks.

3. You want to manage a new AWS service. (CloudFormation support lags behind Terraform, new services don't get CF resources for months)

In cases two and three it’s just as easy to write a custom resource....
You mean just as easy to write/test/deploy a custom resource as it is to use a ready one? I disagree. I think there's a few days of work of difference in that case.
Actually, no.

Examples for creating them in Java, Python and Node are here

https://github.com/stelligent/cloudformation-custom-resource...

Just add a few lines of code for create, update and delete for your resource.

For Node and Python, you can write them in the web console, test them, copy the code to your git repo and export the SAM CF template for your CI/CD process.