Problem
The AzureRM Provider Team states, "breaking change" went out in AzureRM v3.21.0 [a]. The virtual_network block was removed from azurerm_container_registry resource. This block is under the network_rule_set block [b].
Context
Customers reported an error with this argument and the AzureRM team investigated [c].
An argument named "virtual_network" is not expected here.
Fix
The change was reverted and released in AzureRM v3.21.1; please upgrade to this version [d]. For more information, please see the release notes [e].
Links
[a]https://github.com/hashicorp/terraform-provider-azurerm/pull/17926#discussion_r961486298
[c]https://github.com/hashicorp/terraform-provider-azurerm/issues/18232
[d]https://github.com/hashicorp/terraform-provider-azurerm/pull/18239
[e]https://github.com/hashicorp/terraform-provider-azurerm/releases/tag/v3.21.1