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
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!
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.
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
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures