What's GitHub Copilot for Azure?
GitHub Copilot for Azure is an Azure extension available in Visual Studio Code. It integrates support for GitHub Copilot agent and ask modes. Use Azure tools in agent mode to automatically complete Azure tasks, or chat with @azure in ask mode to get help with Azure services, development for Azure, and Azure DevOps tasks. Go to the release notes for details on the latest updates.


Note: GitHub Copilot for Azure currently only supports Windows x64, Windows ARM64, macOS x64, macOS ARM64 and Linux x64.
Agent mode
Agent mode can help you with completing Azure-related tasks by automatically using tools from GitHub Copilot for Azure. You can let agent mode decide on those tools, or you can guide the process by choosing particular tools from the GitHub Copilot for Azure toolset.
GitHub Copilot for Azure tools are:
General
#azureGetBestPractices
: Returns a list of best practices for code generation and operations involving Azure. It is applicable to various Azure technologies and programming languages. Its output remains constant throughout a session.
#azureRetrieveMsLearnDocumentations
: Retrieves relevant documentation and samples from Microsoft Learn to answer your query. It provides knowledge of Azure/Microsoft products, compares features of other cloud platforms with Azure, or assists in moving to Azure from another platform.
#azureGenerateAzureCliCommand
: Generates Azure CLI commands based on the given intent. It is used when you explicitly asks for help with, or examples for, using the Azure CLI, or when Azure CLI commands are needed to complete another task.
#azureDiagnoseResource
: Diagnoses issues with resources including performance and failures by investigating logs, telemetry, and other performance sensors.
#azureAzdUpDeploy
: Provisions Azure resources and deploys the project to Azure using Azure Developer CLI (azd).
#azureGetAzdAppLogs
: Validates the app's live status by retrieving console logs from the log analytics workspace after deployment with Azure Developer CLI (azd).
#azureQueryAzureResourceGraph
: Queries the Azure Resource Graph for information about resources, subscriptions, and resource groups that the you have access to. It is used to obtain detailed information about the your resources.
#azureGetRegionsForModel
: Finds out in what Azure regions a model is available, which is crucial before attempting to deploy a model.
#azureGetModelsForRegion
: Discovers what type of AI models are available in an Azure region.
#azureGetLanguageModelDeployments
: Finds AI deployments in a given subscription, helping in locating the models that are deployed in the AI accounts and resource groups.
#azureGetLanguageModelUsage
: Gets data about Azure AI resource quota and usage in a particular subscription across Azure regions.
#azureBicepGetResourceSchema
: Provides the schema for the most recent apiVersion of an Azure resource, useful when creating or modifying resources in a bicep ARM template.
#azureRecommendServiceConfig
: Provides guidance for creating services and their dependent services detected from the project or asked by the user.
#azureCheckPredeploy
: Ensures that the system is ready to run Azure Developer CLI (azd) and that Bicep files follow Azure Developer CLI (azd) best practices.
#azureGetAuthState
: Gets the current state of authentication for the user, including which account you are signed in to and the current tenant used to query and work with resources.
#azureGetCurrentTenant
: Gets the currently used tenant to query and work with resources.
#azureGetAvailableTenants
: Gets a list of tenants available for querying and working with resources.
#azureSetCurrentTenant
: Sets the tenant used to query and work with resources.
#azureGetSelectedSubscriptions
: Gets a list of default/selected/current subscriptions, which belong to the current tenant, that are used for querying or working with resources.
#azureOpenSubscriptionPicker
: Opens the subscription picker when the user wants to modify/change the default/selected/current subscriptions.
#azureSignOut
: Signs the user out of Azure.

- Set mode to Agent in Chat.
- Select Claude 3.7 Sonnet instead of GPT-4o for agent mode scenarios. This helps improve the invocation of the GitHub Copilot for Azure tools.
- Once the GitHub Copilot for Azure extension is activated, a notification will ask, "Would you like @azure to add Azure-related instructions to this workspace's copilot-instructions.md file?" Select Yes.
- Try to include details in your prompts, especially about your Azure resources.
Alternatively, if you want to select a specific tool, you can say #<name of the tool>
, followed by your prompt.
For general guidance on using agent mode, visit Use Agent mode in VS Code
Examples of prompts:
- Create an Azure storage account and connect to a file upload app
- Deploy a local Python Flask app to Azure
- Create a ToDo web app and deploy it to Azure
- Create a bicep file to deploy a MySQL database to West US 3 region
Ask mode
Ask mode can help you use natural language to interact with large language models to ask questions about the following Azure topics:
- Learn about Azure: @azure can help with your questions about a variety of Azure services and technologies, such as AI, compute, containers, databases, DevOps, network, security, and storage.

- Resource management: @azure can help with getting information about your Azure resources, including summarizing resource usage and resource-specific questions.

- Diagnostics: @azure can help diagnose problems with services, such as Azure API Management, Azure Cache for Redis, Azure Container Apps, Azure Functions, Azure Kubernetes Services, and the Web Apps feature of Azure App Service.

- Cost management: @azure can help estimate historical Azure costs.

- Azure Developer CLI (azd) support: @azure can help you search for application templates and will provide instructions for how to initialize, configure, and deploy.

- Bicep template generation: @azure can help create a Bicep template for building Azure infrastructure.

- Terraform template generation: @azure can help create a Terraform template for building Azure infrastructure.

How do I chat with @azure in ask mode?

- Set mode to Ask in Chat.
- Enter @azure to begin the conversation.
- Try to include details in your prompts, especially about your Azure resources, such as the specific resource and subscription ID. Ask follow-up questions if you need more information.
You can also find a shortcut in the context menu for items in the Azure Resources view.
Examples of prompts:
Learn about Azure
- @azure What kinds of AI services does Azure offer?
- @azure What’s the difference between Azure Container Apps and Azure Kubernetes Service?
Resource management
- @azure What’s the URL for my webapp named [insert name]?
- @azure How many storage accounts do I have in eastus?
Diagnostics and troubleshooting
- @azure Summarize the recent logs in my Azure Container Apps/Azure Kubernetes Service application
- @azure Help me diagnose a problem with Azure Kubernetes Service
Cost management
- @azure Can you show me the cost breakdown by service for Aug 2024 for my current subscription?
- @azure What was my most expensive resource last month?
Azure Developer CLI (azd) support
- @azure Help me deploy my azd template to the cloud
- @azure I'd like to build a Python web API with a MongoDB database and a React.js front end
Bicep template generation
- @azure Give me a Bicep template for creating a key vault, a managed identity, and a role assignment for the managed identity to access the key vault
- @azure Show me a Bicep template that creates an Azure Storage account with a blob container and a file share
Terraform template generation
- @azure Show me a Terraform configuration that creates a web app named "mywebapp"
- @azure Give me a terraform template to create a VM with a public IP address
How do I get started?
To use GitHub Copilot for Azure you’ll need:
- An active GitHub Copilot license.
- The GitHub Copilot Chat extension.
- A Microsoft account.
New to Azure? Sign up for free and get a $200 credit to use on Azure services. Learn more about Azure
Privacy and preview terms
By using GitHub Copilot Chat, you agree to GitHub Copilot Chat preview terms. Review the transparency note to understand about usage, limitations, and ways to improve Copilot Chat during the technical preview.
Your code is yours. We follow responsible practices in accordance with our Privacy Statement to ensure that your code snippets will not be used as suggested code for other users of GitHub Copilot.
To get up-to-date security fixes, use the latest version of the Copilot extension and Visual Studio Code.
Telemetry
Visual Studio Code collects usage data and sends it to Microsoft to help improve our products and services. Read the Microsoft Privacy Statement to learn more. If you don't want to send usage data to Microsoft, you can set the telemetry.enableTelemetry
setting to false
. Get more information in the FAQ section.
Learn more about GitHub Copilot for Azure.
Sign up for a free trial of GitHub Copilot.
Learn more about Responsible Use of GitHub Copilot Chat in your IDE.