Modal Title
DevOps

Terraform’s Best Practices and Pitfalls

Wix's Hila Fish shares her experience in using Terraform and how she learned to use it for scaling operations.
Oct 19th, 2022 12:33pm by
Featued image for: Terraform’s Best Practices and Pitfalls

Wix is a cloud-based development site for making HTML 5 websites and mobile sites with drag-and-drop tools. It is suited for the beginning user or the advanced developer, said Hila Fish, senior DevOps engineer for Wix, in an interview for The New Stack Makers at HashiCorp’s HashiConf Global conference in Los Angeles earlier this month.

Terraform’s Best Practices and Pitfalls

Our questions for Fish focused on Terraform, the open source infrastructure-as-code software tool:

  • How has Terraform evolved in uses since Fish started using it in 2018?
  • How does Wix make the most of Terraform to scale its infrastructure?
  • What are some best practices Wix has used with Terraform?
  • What are some pitfalls to avoid with Terraform?
  • What is the approach to scaling across teams and avoiding refactoring to keep the integrations elegant and working

Fish started using Terraform in an ad-hoc manner back in 2018. Over time she has learned how to use it for scaling operations.

“If you want to scale your infrastructure, you need to use Terraform in a way that will allow you to do that,” Fish said. 

Terraform can be used ad-hoc to create a machine as a resource, but scale comes with enabling infrastructure that allows the engineers to develop templates that get reused across many servers.

“You need to use it in a way that will allow you to scale up as much as you can,” Fish said.

Fish said best practices come from how to structure the Terraform code base.

Much of it comes down to the teams and how Terraform gets implemented. Engineers each have their way of working. Standard practices can help. In onboarding new teams, a structured code base can be beneficial. New teams onboard and use models already in the code base.

And what are some of the pitfalls of using Terraform?

We get to that in the recording and more about integrations, some new capabilities for developers to use Terraform, and getting people onboard to later versions of Terraform.

Users have historically needed to learn HashiCorp configuration language (HCL) to use the HashiCorp configuration language. At Wix, Fish said, the company is implementing Terraform on the backend with a UI that developers can use without needing to learn HCL.

Group Created with Sketch.
TNS owner Insight Partners is an investor in: Pragma, The New Stack.
THE NEW STACK UPDATE A newsletter digest of the week’s most important stories & analyses.