Zerto and Terraform Compatibility Issues during Failover

0
8
Asked By TechGuru42 On

Has anyone had experience running Zerto in Azure for disaster recovery replication while also using Terraform for Azure deployments? I'm facing a problem where Zerto seems to disrupt the Terraform state file after performing a move or live failover and hitting commit. It appears that Zerto deletes the source resources during these processes, but when we return to production, the next Terraform run tries to remove the resources that Zerto created. I've reached out to support, but they basically said this is how Zerto operates. Any tips or workarounds for handling this?

3 Answers

Answered By CloudNinja7 On

It sounds like you're running into a common issue. Zerto doesn't align with Terraform's state management, which can create problems when Zerto manipulates resources during failovers. You might want to consider why you need both in your stack. For managing your deployments, that might be a time to explore alternatives like Bicep or Pulumi, or even stopping Zerto in favor of Terraform for DR deployments and using native replication tools to handle data movement. It all depends on your specific needs!

Answered By DevOpsDynamo On

Yep, this is a typical scenario! When Zerto modifies or recreates resources during a failover, it can throw Terraform's state out of whack. Many teams either avoid managing Zerto resources with Terraform or use the `terraform import` command to pull them back into state after a failover. An alternative is to maintain a separate Terraform state for your DR components to prevent Terraform from trying to revert Zerto's changes.

Answered By AzureWiz On

Yeah, exactly! When Zerto performs these operations, it can lead to mismatched states in Terraform and Azure. A good approach is to keep those replicated resources out of Terraform's control, or manage them in a separate context so Terraform doesn’t attempt to delete what Zerto creates after a failover.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.