Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Terraform vs gcloud deployment-manager

I'm facing a choice terraform of gcloud deployment manager.

Both tools provide similar functionality and unfortunately lacks all resources.

For example:

  • gcloud can create service account (terraform cannot)
  • terraform can manage DNS record set (gcloud cannot)
  • and many others ...

Questions:

  • Can you recommend one tool over the other?
  • What do you think, which tool will have a richer set of available resources in long run?
  • Which solution are you using in your projects?
like image 888
KrHubert Avatar asked Dec 08 '16 13:12

KrHubert


People also ask

Should I use Terraform for deployment?

Terraform is probably the most used tool to deploy cloud services. It's a fantastic tool, easily usable, with descriptive language (DSL) called HCL, team-oriented, supporting tons of cloud providers, etc. On paper, it's an attractive solution.

Does Terraform work with Google Cloud?

Try Terraform on Google Cloud tutorials, courses, and self-paced training from Google Cloud Skills Boost . In this lab, you install Terraform and create a VM instance using Terraform. In this lab, you write infrastructure as code with Terraform.

What is GCP deployment manager?

Google Cloud Deployment Manager is an infrastructure deployment service that automates the creation and management of Google Cloud resources.

Can I use Terraform without cloud?

Yes, Terraform installation is packaged in a container and available on Docker Hub. Thereby, it will be easy to use it with Cloud Build. Second step: How to manage tfstate files? Steren tweet shows how to push a file from Cloud Build environment to Google Cloud Storage at the end of the process.


2 Answers

Someone may say this is not a question you should ask on stackoverflow, but I will answer anyway.

It is possible to combine multiple tools. The primary tool you should run is Terraform. Use Terraform to manage all resources it supports natively, and use external provider to invoke gcloud (or anything else). While it will be not very elegant sometimes it will make the work.

Practically I do same approach to invoke aws-cli in external.

like image 148
Anton Babenko Avatar answered Sep 25 '22 09:09

Anton Babenko


I personally found deployment manager harder to get started with for what I wanted to do. Although I had previous experience with terraform, therefore I may be biased. Terraform for me was easier.

Thats said though, the gcloud command line tool is extremely good and as Anton has said, you can feed that in when you need it via external. Also note, this is what terraform does and has been doing for a long time. They are also quite good in my experience of adding new features etc. Yes Gcloud Deployment Manager might have them first, as its google in house, but terraform would never be far behind.

In the long run terraform may be easier to integrate with other services, and there's always the options of going to other providers. On top of that, you have one configuration format to use. As this is what terraform does, I find the way you structure and work with it very logical and easily understood. Something thats valuable if your going to be sharing and working with other team members.

like image 44
hawksight Avatar answered Sep 24 '22 09:09

hawksight