Both ARM and Terraform are valid ways to handle automated Azure deployments at this scale. You could also use the Azure CLI or management API, but since you can't simply export the scripts, using one of these alone isn't going to be the best choice.
While ARM can handle large deployments, there are limits on what a single template can hold, as you have discovered. I also want to acknowledge that, while exporting templates from the portal is the simplest way to create them, it does not handle every situation. This is something that we will continue to improve on. We provide feedback from Q&A to the product teams to help guide their product planning, but you can also post your requests to UserVoice or vote on existing suggestions. The forum is actively monitored, and the voting system helps the product teams prioritize new features.
----------
You can handle this situation by essentially breaking your templates into deployment stages. By selecting specific resources inside the resource group, you will be able to export the templates for just those resources. One way to keep track of which resources are in which template would be to add tags to the resources with that information. You can then filter the list by tag value when exporting templates and ensure that all the resources are defined in an exported template.
There are a few different ways to put the templates back together into a single deployment. It isn't possible to export the piece that links the templates, so you will need to create that part yourself.
- Linked templates. In this scenario, you would create a main template that handles gathering parameters and passing them to each of your resource templates in turn. The main template is also able to pass values between the templates where you need to do so.
- Make use of the Azure CLI or management API. While I would suggest against using one of these tools to define your entire deployment at this stage, both tools can deploy ARM templates. These tools are the best option if you want to modify your services after they are deployed without changing your templates.
- Use the Deployment Manager service that is currently in public preview. The service works similarly to linked templates, but lets you define more clearly how your services are linked together and how they should be deployed. This is the most robust option for large scale deployments. However, it is important to know that preview services aren't recommended for production deployments as bugs and breaking changes are going to be more common.