|
| 1 | +--- |
| 2 | +title: 'Use Terraform to create an Azure AI Studio hub' |
| 3 | +description: In this article, you create an Azure AI hub, an AI project, an AI services resource, and additional resources. |
| 4 | +ms.topic: how-to |
| 5 | +ms.date: 07/09/2024 |
| 6 | +titleSuffix: Azure AI Studio |
| 7 | +ms.service: azure-ai-studio |
| 8 | +manager: scottpolly |
| 9 | +ms.reviewer: andyaviles |
| 10 | +ms.author: larryfr |
| 11 | +author: Blackmist |
| 12 | +ms.custom: devx-track-terraform |
| 13 | +content_well_notification: |
| 14 | + - AI-contribution |
| 15 | +ai-usage: ai-assisted |
| 16 | +customer intent: As a Terraform user, I want to see how to create an Azure AI hub and its associated resources. |
| 17 | +--- |
| 18 | + |
| 19 | +# Use Terraform to create an Azure AI Studio hub |
| 20 | + |
| 21 | +In this article, you use Terraform to create an Azure AI hub, an AI project, and AI services connection. Azure AI hub is a central place for data scientists and developers to collaborate on machine learning projects. It provides a shared, collaborative space to build, train, and deploy machine learning models. It's integrated with Azure Machine Learning and other Azure services, making it a comprehensive solution for machine learning tasks. The hub also allows you to manage and monitor your AI deployments, ensuring they're performing as expected. |
| 22 | + |
| 23 | +[!INCLUDE [About Terraform](~/azure-dev-docs-pr/articles/terraform/includes/abstract.md)] |
| 24 | + |
| 25 | +> [!div class="checklist"] |
| 26 | +> * Create a resource group |
| 27 | +> * Set up a storage account |
| 28 | +> * Establish a key vault |
| 29 | +> * Configure AI services |
| 30 | +> * Build an Azure AI hub |
| 31 | +> * Develop an AI project |
| 32 | +> * Establish an AI services connection |
| 33 | +
|
| 34 | +## Prerequisites |
| 35 | + |
| 36 | +- Create an Azure account with an active subscription. You can [create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F). |
| 37 | + |
| 38 | +- [Install and configure Terraform](/azure/developer/terraform/quickstart-configure) |
| 39 | + |
| 40 | +## Implement the Terraform code |
| 41 | + |
| 42 | +> [!NOTE] |
| 43 | +> The sample code for this article is located in the [Azure Terraform GitHub repo](https://github.com/Azure/terraform/tree/master/quickstart/101-ai-studio). You can view the log file containing the [test results from current and previous versions of Terraform](https://github.com/Azure/terraform/tree/master/quickstart/101-ai-studio/TestRecord.md). |
| 44 | +> |
| 45 | +> See more [articles and sample code showing how to use Terraform to manage Azure resources](/azure/terraform) |
| 46 | +
|
| 47 | +1. Create a directory in which to test and run the sample Terraform code and make it the current directory. |
| 48 | + |
| 49 | +1. Create a file named `providers.tf` and insert the following code. |
| 50 | +:::code language="Terraform" source="~/terraform_samples/quickstart/101-ai-studio/providers.tf"::: |
| 51 | + |
| 52 | +1. Create a file named `main.tf` and insert the following code. |
| 53 | +:::code language="Terraform" source="~/terraform_samples/quickstart/101-ai-studio/main.tf"::: |
| 54 | + |
| 55 | +1. Create a file named `variables.tf` and insert the following code. |
| 56 | +:::code language="Terraform" source="~/terraform_samples/quickstart/101-ai-studio/variables.tf"::: |
| 57 | + |
| 58 | +1. Create a file named `outputs.tf` and insert the following code. |
| 59 | +:::code language="Terraform" source="~/terraform_samples/quickstart/101-ai-studio/outputs.tf"::: |
| 60 | + |
| 61 | +## Initialize Terraform |
| 62 | + |
| 63 | +[!INCLUDE [terraform-init.md](~/azure-dev-docs-pr/articles/terraform/includes/terraform-init.md)] |
| 64 | + |
| 65 | +## Create a Terraform execution plan |
| 66 | + |
| 67 | +[!INCLUDE [terraform-plan.md](~/azure-dev-docs-pr/articles/terraform/includes/terraform-plan.md)] |
| 68 | + |
| 69 | +## Apply a Terraform execution plan |
| 70 | + |
| 71 | +[!INCLUDE [terraform-apply-plan.md](~/azure-dev-docs-pr/articles/terraform/includes/terraform-apply-plan.md)] |
| 72 | + |
| 73 | +## Verify the results |
| 74 | + |
| 75 | +Run [`az ml workspace show`](/cli/azure/ml/workspace#az_ml_workspace_show) to view the Azure AI hub. |
| 76 | + |
| 77 | +```azurecli |
| 78 | +az ml workspace show --name <workspace_name> --resource-group <resource_group_name> |
| 79 | +``` |
| 80 | + |
| 81 | +Replace `<workspace_name>` and `<resource_group_name>` with your Azure AI hub name and resource group name, respectively. |
| 82 | + |
| 83 | +## Clean up resources |
| 84 | + |
| 85 | +[!INCLUDE [terraform-plan-destroy.md](~/azure-dev-docs-pr/articles/terraform/includes/terraform-plan-destroy.md)] |
| 86 | + |
| 87 | +## Troubleshoot Terraform on Azure |
| 88 | + |
| 89 | +[Troubleshoot common problems when using Terraform on Azure](/azure/developer/terraform/troubleshoot). |
| 90 | + |
| 91 | +## Next steps |
| 92 | + |
| 93 | +> [!div class="nextstepaction"] |
| 94 | +> [See more articles about Azure ai hub](/search/?terms=Azure%20ai%20hub%20and%20terraform) |
0 commit comments