The big difference between Bicep and Terraform in this area is state. Bicep takes it's state directly from Azure, Terraform maintains a state file which it uses as it's source of truth. By default when you run Terraform Plan or Apply it will also run a refresh command against the infrastructure in Azure to compare it to the state in Azure and modify the state file if needed.
So, given that, generally you should get the same result from Bicep's What-If and Terraform Plan, but it might not be exactly the same for a few reasons:
- Terraform's preview is a lot more mature than the what-if command, it's been around longer and they have weeded out a lot of the issues around displaying changes that actualy are just platform data that you have no control over.
- If you force Terraform to not do a refresh then it will only look at the state file, which may differ from what is in Azure
So if your purely looking at being able to do what-if/plan type comparisons then either language would proabably do what you want. Personally I find the Terraform plan experience a bit nicer than the what-if one, but that's personal preference.
That said, I wouldn't be making a decision to use Terraform or not purely based on that. Terraform has many other features that may be useful to you. The biggest one being the ability to deploy non-azure resources, so if your looking to do cross-cloud deployments this is important. Another feature is the ability to destroy resources, because Terraform tracks everything in it's state file it can destroy what it created, Bicep/ARM can't do that. So it really depends what you want your IaC tool to do.