Can I Use Terraform to Deploy Microsoft Foundry and Manage Models?

0
11
Asked By CuriousCoder42 On

Hey everyone! I'm trying to figure out if it's possible to deploy the new Microsoft Foundry using Terraform. I've seen references to the azurerm_ai_foundry resource, but it seems to be tied to the older version that only supports OpenAI models. Am I getting this wrong? Microsoft's AI strategy feels pretty confusing with all the name changes, so any clarification would be super helpful. Also, can we manage and deploy models to Foundry through Terraform? Thanks for your insights!

4 Answers

Answered By AzureAdvocate On

Yes, it’s possible but keep in mind the new Foundry doesn't work well with private link yet. I had to switch to AZAPI since the AzureRM provider is lagging in support for certain features like attaching capability hosts. You might want to check out Microsoft.CognitiveServices/accounts@2025-06-01 for Foundry and Microsoft.CognitiveServices/accounts/projects@2025-06-01 for projects.

Answered By AnalyticalAdventurer On

That comment about "Foundry" hints at a broader issue. It seems like the confusion isn't just with Terraform but also with how Microsoft is integrating Foundry into its ecosystem. Are you trying to set this up for production, or just testing its stability for now?

Answered By GadgetGuru2022 On

Just a heads up, if you're using a project-based Foundry resource, models need to be deployed using the Foundry CLI with JSON files from a repo instead. We’ve had success running it with project management turned off while deploying via Terraform.

TerraformExplorer -

What Terraform resources are you currently deploying with it?

Answered By TechGuru_159 On

To deploy the new Foundry, you'll want to use the azurerm_ai_services resource instead. You can also deploy models with azurerm_cognitive_deployment. It's a better fit for what you're looking for!

HelpfulHuman88 -

Exactly! Just to add some context, you can also deploy the AI Services resource through the cognitive services account resource, which has extra features. Just be mindful that some functions in azurerm aren't available yet; you might need to use the APIs via azapi for those. And don't worry about what the docs say regarding PTU backed models - you can build them, provided you have PTUs in the SKU available first.

SampleSeeker77 -

And if you're looking for examples, check out this GitHub repo from Microsoft that covers different Foundry scenarios: https://github.com/Azure-Samples/azureai-samples. It might help you get started!

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.