Affinity’s relationship intelligence platform is designed to structure and analyze millions of data points across emails, calendars, and third-party sources. It uses AI to assess relationship strength and highlight the best route to warm introductions, automating the management of key relationships and revealing overlooked opportunities for dealmakers.
Senior software engineer Chris Nantau is part of the infrastructure team at Affinity. He spoke to us about the ways Spacelift has enhanced their Terraform experience.
The team at Affinity was intent on adopting a more modern approach to infrastructure, prioritizing small workspace workflows in Terraform and maximizing segregation. However, they were struggling to overcome some key pain points:
The Affinity team relied on small applies for their workflows, but their existing Terraform setup was generally poor at picking up runs or detecting what was causing the blockage if something was blocked.
The user experience (UX) was also inadequate, making it difficult to see why something wasn’t working when the team was merging multiple runs. From an integrations perspective, it didn’t give developers an easy way to get visibility on groupings or whatever they wanted to see. “Handling permissions was a real slog,” adds Chris.
Chris discovered Spacelift through a friend of his, who had read about the platform on the Console.dev newsletter. Having done his research, Chris concluded that Spacelift would resolve the bulk of their problems with Terraform. “So I pitched it to the team, and then we started the proof-of-concept (POC) process. And the rest is history,” he recalls. The company has since moved 239 stacks to Spacelift. “We did assess other options after the POC process, but Spacelift seemed to have all of the features we needed – like user management, policy, and the right UX.”
Open Policy Agent (OPA) is a key consideration for Affinity – and for Spacelift. An open-source engine that allows you to declaratively write policies as code and incorporate those policies in a decision-making process, OPA has many benefits that Spacelift users can enjoy without having to implement everything from scratch.
Previously, the Affinity team used Terraform both as their runner and for state management. Now, they use Amazon S3 for state management, but because this is connected to the Spacelift provider, state management is something they don’t have to worry about. They use Terraform primarily as their runner, as a single point to coordinate on role-assumption. Before the migration to Spacelift, infrastructure devs would have to make manual changes in test environments because their Terraform provider’s performance and responsiveness would break up the development workflow and slow down iteration.
Moving to Spacelift has transformed the Terraform experience for Affinity developers. “We have a very split team when it comes to liking or hating Terraform,” explains Chris. “Half of us really like it, and half of us really hate it — but a lot of that hate comes from working with our previous Terraform platform.” Its approach to managing infrastructure did not align with the way Affinity developers think about infrastructure, and they experienced multiple issues using it. That has changed since the company migrated to Spacelift. “Even our Terraform haters are more willing to work in it without audibly groaning,” laughs Chris.
Integrating Affinity’s existing systems with Spacelift has been a smooth process. Because of the company’s complex infrastructure setup, they had made little use of potential Terraform platform integrations, apart from integrating it with their version control system (VCS) provider. However, now they plan to do more with Terraform, using Spacelift APIs for some of the operations involved in work like refactoring. This was not a realistic prospect with their previous platform because of shortcomings in the API and support.
Now that Affinity developers don’t have to spend so much time on manual tasks, they are working far more productively – even from a policy perspective. “When we know something is going to a certain environment and the risk is really low, we just apply the change automatically now, as soon as it hits our main branch. Previously, even for a very simple change, we would have to individually approve it for each of our five environments.” Anything that requires even minimal diligence is likely to fail due to human error, with people simply forgetting to roll out a change in a specific environment, for example. “We’ve saved a heap of time and annoyance just by using Spacelift policies,” Chris reveals.
Affinity is using Spacelift’s Terraform provider for all its dependency trees, so the team can spin up and tear down ephemeral environments much more easily on a cadence, allowing them to guarantee certain invariants with the organization. “Generally, it’s facilitated a lot of automation we would have had to build ourselves and grow manually.”
Another Spacelift feature that makes Chris and his team really happy is performing bulk actions on Stacks. “It’s like the best thing that has ever been invented in the history of anything related to Terraform!” This feature means you don’t have to click through multiple screens to perform a small number of actions. “Being able to just go ‘safe, safe, safe, safe’ and then bulk apply has been a godsend because I’m usually the one to go in and clean it up,” he says.
Affinity is committing solidly to Spacelift. Plans include using it for the Red Hat Ansible automation platform and also for DataDog. “We’ve set up the Datadog integration but haven’t started using it yet. It’s our observability platform, so that was a nice recent feature,” Chris points out.
The team is also looking forward to integrating drift detection. “We’re pretty excited about leveraging it,” says Chris. “Drift is one of the reasons we ended up buying private workers; otherwise we would have just used public ones.”
And if something doesn’t go exactly as planned, the team never worries. Getting accessible, friendly support precisely when they need it has been key to Affinity’s successful migration. That’s where Chris singles out Spacelift for special praise: “Your support guys are the best I’ve ever interacted with in a software vendor. Please keep doing what you’re doing there!”