[Live Webinar] Introducing Spacelift Run Observability for OpenTofu

Register ➡️

Back to list

Software Development

Enabling a Smooth Migration to OpenTofu for Talkdesk

Summary
Talkdesk® automates the world’s most complex customer journeys. By resolving customer requests from start to finish, AI agents enable a hybrid workforce where human expertise is reserved for the moments that matter most. The company manages a complex infrastructure spanning multiple regions and cloud providers, primarily AWS. The scale of this infrastructure is epic, involving 4 million lines of Terraform code, so managing deployments efficiently is crucial. When HashiCorp placed new versions of Terraform under the BUSL license, Talkdesk made the strategic decision to migrate to the open-source fork that became known as OpenTofu. Spacelift played a key role in facilitating a smooth transition.
  • Icon featuring 3 figures of people, two in lilac and one in purpleHaving a community-driven alternative to Terraform was important to Talkdesk.
  • Padlock iconAvoiding vendor lock-in is part of the future of OpenTofu at Talkdesk.
  • rocket iconThe adoption of OpenTofu and Spacelift has positioned Talkdesk for continued growth and efficiency.

The challenge for Talkdesk

HashiCorp’s decision to change to a BUSL license for Terraform prompted Talkdesk to explore alternatives. Faced with such a move, Talkdesk had to consider the enormous task of migrating a massive infrastructure-as-code (IaC) footprint without disrupting operations. Luis Almeida, VP of Technology, emphasized the need for a “seamless migration” and the importance of “continued feature availability.” Marcelo Almeida, Senior Principal Platform Engineer, highlighted the sheer scale, stating, “we currently have around 4 million lines of code in Terraform, which, as you can imagine, is a lot to manage.”

Why Talkdesk chose OpenTofu

Luis Almeida recalled the decision to switch to OpenTofu: “We started looking at OpenTofu services because it was showing up as a good alternative to Terraform.” The open-source nature of OpenTofu was a significant draw. Luis noted, “having a community-driven alternative was important for us; we are very open-source invested.” They also knew that the transition would have to be painless for the switch to be possible, so OpenTofu’s billing as a “drop-in replacement for Terraform” was a key element of the decision to move.

Migration Principles:

Talkdesk’s migration strategy was guided by key principles:

  • Validating compatibility: Ensuring existing Terraform code worked seamlessly with OpenTofu
  • Refining standards: Taking the opportunity to improve code organization and standards
  • Segmenting state stores: Increasing isolation between resources for better management and automation
  • Organizing code: Optimizing code organization and module usage to reduce redundancy

Marcelo Almeida elaborated on the state store segmentation, saying, “We actually segmented even more to have more isolations between resources, so that we can invest more in self-service for the engineering platform.”

Talkdesk was particularly interested in OpenTofu features like:

  • Loop providers
  • Loopable import blocks
  • State encryption
  • Variables on backend blocks
  • Marked variables/outputs for deprecation
  • Arbitrary lifecycle policies

These features offered the potential for increased efficiency and better compliance. As Marcelo pointed out in relation to loop providers,”the drier our code can be, the better for our engineers, and the less human error we will have.”

Talkdesk's Spacelift experience

Talkdesk previously used Atlantis to automate Terraform workflows but encountered limitations related to scalability and concurrency. Marcelo Almeida explained: “When you operate at scale, it’s easy to face some concurrency issues because Atlantis is a single runner and doesn’t have multiple runners that we can parallelize.”

Spacelift addressed these limitations by providing:

  • Scalability: Supporting multiple workers for parallel execution
  • Multi-infrastructure code support: Handling Terraform, OpenTofu, Ansible, and CloudFormation
  • Drift detection: Identifying and potentially remediating infrastructure drift
  • Developer policies: Enforcing governance and compliance rules
  • Stack dependencies: Managing dependencies between stacks and propagating changes downstream

As Marcelo recalled, “getting Spacelift up and running was pretty easy: We just integrated Spacelift with our pipelines, started using all the resources there, and Spacelift started doing all its magic by itself.” It wasn’t long before the team was seeing real progress. “With Spacelift, our platform team was able to deploy much faster and have better control of the resources they were deploying by leveraging Spacelift policies and drift detection. So now the platform team is freer to make automation improvements that speed up the deployment and the delivery of infrastructure to our engineers and our teams.”

Marcelo also emphasized the importance of stack dependencies, stating, “We can link stacks between each other so they can depend on each other and wait for a run to finish on a previous slide and then trigger the second one.”

Current status and future plans:

Talkdesk is currently running both Terraform and OpenTofu but aims to convert everything to OpenTofu. As Marcelo Almeida noted, “we are running Terraform and OpenTofu, but we want to put everything in the same state, namely converting Terraform to OpenTofu.”

Looking ahead, Talkdesk plans to:

  • Continue investing in IaC
  • Expand internal providers
  • Contribute to third-party providers
  • Avoid vendor lock-in 

Luis Almeida summarized this list of objectives as “the future of OpenTofu at Talkdesk, and one of the reasons why we decided to go with OpenTofu and move away from Terraform.”

Talkdesk’s migration to OpenTofu is an impressive example of how to transition successfully to an open-source IaC solution. Despite the scale of the project involved, Spacelift helped Talkdesk achieve a seamless migration by making meticulous plans, maintaining a laser-sharp focus on key principles, and leveraging the power of the Spacelift platform to execute the transition without disrupting operations. The adoption of OpenTofu and Spacelift has positioned Talkdesk for continued growth and efficiency in managing its complex infrastructure.

In this story

Schedule a demoContact sales

Luis Almeida & Marcelo Almeida

VP of Technology & Senior Principal Platform Engineer

“Our platform team was able to deploy much faster and have better control of the resources they were deploying by leveraging Spacelift policies and drift detection.”

Other stories

Design Services

figma logo in color
Read story

Software Development

lansweeper_logo 3 (3)
Read story

Fintech

EDX logo color
Read story