6 ms·
I keep hearing how great Terraform is because it allows you to treat infrastructure as code in a cloud agnostic manner. But every time I see a Terraform script
by scarface74 8y ago
I keep hearing how great Terraform is because it allows you to treat infrastructure as code in a cloud agnostic manner. But every time I see a Terraform script, it's tied tightly to AWS's infrastructure -- including Hashicorp's own examples.
- sethvargo 8y agoHey there - Seth from Google here. We have a dedicated team of Google engineers who contribute to Terraform as their full time job. We are constantly looking for ways to improve. We added a lot of examples to our Google provider documentation, and we are working on a project that will enable us to add support for new GCP features in Terraform faster. I can’t speak for HashiCorp’s own examples (I mean, I could, I used to work there), but we have a lot of documentation and examples in the Google bits. If there’s a specific thing you think is missing, I’d be happy to help address it.
- scarface74 8y agoThat wasn't meant as a critique on either GCP or Terraform. Given a choice between Google creating another bespoke framework for infrastructure as code like CloudFormation and using Terraform, I think choosing Terraform was a great choice. I am huge fan of Hashicorp's other offerings - Consul, Nomad, and Vault. It was meant more as a critique of people choosing Terraform over CloudFormation for AWS to prevent "vendor lock in".
- briffle 8y agoWe use terraform to create our new projects, but with them not supporting kubernetes deployments it would be very difficult for us to continue to use them after standup. (I then script kubectl commands to create our deployments, etc.) Their own github repo issue list said they wouldn't support deployments when it was in beta (hashicorp won't do anything that is in beta, another problem with google cloud and its long, stable betas).. Kuberenetes deployments have been out of Beta for at least 6 months, and no movement on the kubernetes provider
- briffle 8y agoI should have included this earlier: https://github.com/terraform-providers/terraform-provider-kubernetes/issues/3 https://github.com/terraform-providers/terraform-provider-ku... Deployments have been in GA 7 months now, and NO feedback from hashicorp on this one...
- sethvargo 8y ago:) This one actually personally bothers me too. I have a really hacky shell-out to kubectl because deployments aren't currently supported, so I definitely empathize here. That being said, Google doesn't currently maintain the Kubernetes provider for Terraform; it's entirely maintained by HashiCorp.
- scarface74 8y agoWhen I was first looking into choosing between CloudFormation and TF not knowing either, I was actually leaning toward TF because of my positive experience using Hashicorps other products. The two things that swayed me toward CF was reading that TF is usually slightly behind CF with adding support for new features when they were introduced by AWS and my rule of always choose the platform providers preferred solution.
- dantiberian 8y agoTerraform is great because it lets you treat infrastructure as code, but I don't think it makes any promises about cloud agnosticism. In fact it's the opposite, each provider is specific to the service that they are offering. Rather than Terraform offering a lowest common denominator set of resource definitions, each provider can be designed to work in a way that most naturally maps to their offerings and API. In theory you could write modules that provide abstractions over multiple cloud providers, but I don't know how good a result that would give.
- scarface74 8y agoIn that case, if you're on AWS, then why not just use CloudFormation? CloudFormation is a lot more powerful on AWS than TF.
- geggam 8y agoBecause editing yaml or json sucks.
- scarface74 8y agoLinked from Hashicorp’s Getting Started page... https://github.com/terraform-providers/terraform-provider-aws/blob/master/examples/two-tier/main.tf https://github.com/terraform-providers/terraform-provider-aw...
- marcinzm 8y agoWhich is neither json or yaml...
- scarface74 8y agoIt's yet another semi-json format that doesn't have widespread support by any other parsers. Even Hashicorp recommends JSON if you want something that is machine readable.
- skywhopper 8y agoTerraform doesn’t abstract away the details of which cloud provider you are using. That would be impractical if not impossible for anything beyond trivial use cases. But it does let you abstract away the logic in dealing with maintaining infrastructure that’s managed through APIs. And the provider support for each cloud makes a huge difference in how usable it is. The AWS support is generally great so I assume the GCP support here is as well.