Sveriges mest populära poddar

The New Stack Podcast

Terraform's Best Practices and Pitfalls

14 min • 19 oktober 2022

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.

 

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, why Wix is still on version 0.13, and some new capabilities for developers to use 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.

Förekommer på
00:00 -00:00