Skip to content

Commit 9ef4114

Browse files
committed
terraform scenario
1 parent 31aec79 commit 9ef4114

File tree

4 files changed

+41
-1
lines changed

4 files changed

+41
-1
lines changed

articles/copilot/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
href: generate-cli-scripts.md
3939
- name: Generate PowerShell scripts
4040
href: generate-powershell-scripts.md
41+
- name: Generate Terraform infrastructure
42+
href: generate-terraform-configurations.md
4143
- name: Author API Management policies
4244
href: author-api-management-policies.md
4345
- name: Work with AKS clusters

articles/copilot/capabilities.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Microsoft Copilot in Azure capabilities
33
description: Learn about the things you can do with Microsoft Copilot in Azure.
4-
ms.date: 05/28/2024
4+
ms.date: 06/17/2024
55
ms.topic: conceptual
66
ms.service: copilot-for-azure
77
ms.custom:
@@ -39,6 +39,7 @@ Use Microsoft Copilot in Azure to perform many basic tasks in the Azure portal o
3939
- Write and optimize code:
4040
- [Generate Azure CLI scripts](generate-cli-scripts.md)
4141
- [Generate PowerShell scripts](generate-powershell-scripts.md)
42+
- [Generate Terraform configurations](generate-terraform-configurations.md)
4243
- [Discover performance recommendations with Code Optimizations](optimize-code-application-insights.md)
4344
- [Author API Management policies](author-api-management-policies.md)
4445
- [Create Kubernetes YAML files](generate-kubernetes-yaml.md)
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: Generate Terraform configurations using Microsoft Copilot in Azure
3+
description: Learn about scenarios where Microsoft Copilot in Azure can generate PowerShell scripts for you to customize and use.
4+
ms.date: 06/17/2024
5+
ms.topic: conceptual
6+
ms.service: copilot-for-azure
7+
ms.author: jenhayes
8+
author: JnHs
9+
---
10+
11+
# Generate Terraform configurations using Microsoft Copilot in Azure
12+
13+
Microsoft Copilot in Azure (preview) can generate Terraform configurations that you can use to create and manage your Azure infrastructure.
14+
15+
When you tell Microsoft Copilot in Azure about some Azure infrastructure that you want to manage using Terraform, it provides a configuration using resources from the [AzureRM provider](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs). In addition to the primary resources, any dependent resources required to accomplish a successful deployment are included in the configuration. You can ask follow-up questions to further customize the configuration. Once you've reviewed the configuration and are happy with it, copy the configuration contents and deploy the configuration using your Terraform deployment method of choice.
16+
17+
[!INCLUDE [scenario-note](includes/scenario-note.md)]
18+
19+
[!INCLUDE [preview-note](includes/preview-note.md)]
20+
21+
## Sample prompts
22+
23+
Here are a few examples of the kinds of prompts you can use to generate Terraform configurations. Modify these prompts based on your real-life scenarios, or try additional prompts to create different kinds of queries.
24+
25+
- "Create a Terraform config for a Cognitive Services instance with name 'mycognitiveservice' and S0 pricing tier. I need it to have the Text Analytics and Face APIs enabled, and I also need the access keys for authentication purposes."
26+
- "Show me a Terraform configuration for a virtual machine with a size of 'Standard_D2s_v3' and an image of 'UbuntuServer 18.04-LTS'. The resource should be placed in the West US location and have a public IP address. Additionally, it should have a managed disk with a size of 50 GB and be part of a virtual network."
27+
- "Create Terraform configuration for a container app resource with name 'myapp' and Linux OS. Specify the Docker image to be pulled from 'myrepository' and use port 80 for networking. Set the CPU and memory limits to 2 and 4GB respectively. Enable automatic scaling based on CPU usage and set the scaling range between 2 to 10 instances. Also, configure environment variables and mount a storage account for persistent data."
28+
- "What is the Terraform code for a Databricks workspace in Azure with name 'myworkspace' and a premium SKU. The workspace should be created in the West US region. I also need to enable workspace-wide access control with Microsoft Entra integration."
29+
- "Use Terraform to create a new Azure SQL database named 'mydatabase' with Basic SKU and 10 DTU. Set the collation to 'SQL_Latin1_General_CP1_CI_AS' and enable Microsoft Entra authentication. Also, enable long-term backup retention and configure geo-replication to a secondary region for high availability."
30+
31+
## Next steps
32+
33+
- Explore [capabilities](capabilities.md) of Microsoft Copilot in Azure.
34+
- Learn more about [Terraform on Azure](/azure/developer/terraform/overview).

articles/copilot/index.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ conceptualContent:
9090
- url: ./generate-powershell-scripts.md
9191
itemType: get-started
9292
text: Generate PowerShell scripts
93+
- url: ./generate-terraform-configurations.md
94+
itemType: get-started
95+
text: Generate Terraform configurations
9396
- url: ./generate-kubernetes-yaml.md
9497
itemType: get-started
9598
text: Generate Kubernetes YAML files

0 commit comments

Comments
 (0)