Skip to content

Commit 9ba7d41

Browse files
committed
add azurerm samples
1 parent b1f49e1 commit 9ba7d41

File tree

1 file changed

+24
-7
lines changed

1 file changed

+24
-7
lines changed

articles/ai-foundry/how-to/create-resource-terraform.md

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ ai-usage: ai-assisted
1515
#customer intent: As a Terraform user, I want to see how to configure Azure AI Foundry using Terraform, so I can automate my setup.
1616
---
1717

18-
# Use Terraform to create Azure AI Foundry resource
18+
# Use Terraform to manage Azure AI Foundry resources
1919

20-
In this article, you use Terraform to create an [Azure AI Foundry](https://ai.azure.com/?cid=learnDocs) resource. You learn how to use Terraform to create AI Foundry management configurations including projects, deployments, and connections.
20+
In this article, you use Terraform to manage an [Azure AI Foundry](https://ai.azure.com/?cid=learnDocs) resource. You learn how to use Terraform to manage AI Foundry management configurations including projects, deployments, and connections.
2121

22-
The examples used in article use the [AzAPI](/azure/developer/terraform/overview-azapi-provider) Terraform provider. Similar [AzureRM](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/ai_services) provider support is available via the classic `AzureRM_AIServices` module (using the `aiservices` kind as its value), but is limited in functionality to resource and deployment creation.
22+
You can use either the [AzAPI](/azure/developer/terraform/overview-azapi-provider) or [AzureRM](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cognitive_account) Terraform provider to manage Azure AI Foundry resources. While the AzAPI provider lets you access to all Foundry control plane configurations including preview features, the AzureRM variant is limited to core management capabilities.
2323

2424
[!INCLUDE [About Terraform](~/azure-dev-docs-pr/articles/terraform/includes/abstract.md)]
2525

@@ -39,10 +39,7 @@ The examples used in article use the [AzAPI](/azure/developer/terraform/overview
3939

4040
## Implement a basic AI Foundry configuration using Terraform code
4141

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-azure-ai-foundry). 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-azure-ai-foundry/TestRecord.md). You may need to update the resource provider versions used in the template to use the latest available versions.
44-
>
45-
> See more [articles and sample code showing how to use Terraform to manage Azure resources](/azure/terraform)
42+
# [AzAPI](#tab/azapi)
4643

4744
1. Create a directory in which to test and run the sample Terraform code and make it the current directory.
4845

@@ -58,6 +55,24 @@ The examples used in article use the [AzAPI](/azure/developer/terraform/overview
5855

5956
:::code language="Terraform" source="~/foundry-samples-main/samples/microsoft/infrastructure-setup-terraform/00-basic/code/variables.tf":::
6057

58+
# [AzureRM](#tab/azurerm)
59+
60+
1. Create a directory in which to test and run the sample Terraform code and make it the current directory.
61+
62+
1. Create a file named `providers.tf` and insert the following code.
63+
64+
:::code language="Terraform" source="~/foundry-samples-main/samples/microsoft/infrastructure-setup-terraform/00-basic-azurerm/code/providers.tf":::
65+
66+
1. Create a file named `main.tf` and insert the following code.
67+
68+
:::code language="Terraform" source="~/foundry-samples-main/samples/microsoft/infrastructure-setup-terraform/00-basic-azurerm/code/main.tf":::
69+
70+
1. Create a file named `variables.tf` and insert the following code.
71+
72+
:::code language="Terraform" source="~/foundry-samples-main/samples/microsoft/infrastructure-setup-terraform/00-basic-azurerm/code/variables.tf":::
73+
74+
---
75+
6176
## Initialize Terraform
6277

6378
[!INCLUDE [terraform-init.md](~/azure-dev-docs-pr/articles/terraform/includes/terraform-init.md)]
@@ -87,5 +102,7 @@ See the [Azure AI Foundry Samples](https://github.com/azure-ai-foundry/foundry-s
87102
## Next steps
88103

89104
> [!div class="nextstepaction"]
105+
> [See AzureRM reference docs for Azure AI Foundry](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cognitive_account)
106+
> [Learn more about AzAPI provider](/azure/developer/terraform/overview-azapi-provider)
90107
> [See more articles about Azure AI Foundry hub](/search/?terms=Azure%20ai%20hub%20and%20terraform)
91108

0 commit comments

Comments
 (0)