You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
-h, --help Gets help for azd.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
See also
azd config: Manage the Azure Developer CLI user configuration.
azd up: Initialize the app, provision Azure resources, and deploy your project with a single command.
azd version: Print the version number of Azure Developer CLI.
azd config
Manage the Azure Developer CLI user configuration.
Synopsis
Manage the Azure Developer CLI user configuration, which includes your default Azure subscription and location.
Available since azure-dev-cli_0.4.0-beta.1.
The easiest way to configure azd for the first time is to run azd init. The subscription and location you select will be stored in the config.json file located in the config directory. To configure azd anytime afterwards, you'll use azd config set.
The default value of the config directory is:
$HOME/.azd on Linux and macOS
%USERPROFILE%.azd on Windows
The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.
Options
-h, --help Gets help for config.
Options inherited from parent commands
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.
azd config get <path> [flags]
Options
-h, --help Gets help for get.
-o, --output string The output format (the supported formats are json). (default "json")
Options inherited from parent commands
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
See also
azd config: Manage the Azure Developer CLI user configuration.
Lists all configuration values in the configuration path.
The default value of the config directory is:
$HOME/.azd on Linux and macOS
%USERPROFILE%\.azd on Windows
The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.
azd config list [flags]
Options
-h, --help Gets help for list.
-o, --output string The output format (the supported formats are json). (default "json")
Options inherited from parent commands
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
See also
azd config: Manage the Azure Developer CLI user configuration.
Resets all configuration in the configuration path.
The default value of the config directory is:
$HOME/.azd on Linux and macOS
%USERPROFILE%\.azd on Windows
The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable to the default.
azd config reset [flags]
Options
-h, --help Gets help for reset.
Options inherited from parent commands
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
See also
azd config: Manage the Azure Developer CLI user configuration.
The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.
azd config set <path> <value> [flags]
Examples
azd config set defaults.subscription <yourSubscriptionID>
azd config set defaults.location eastus
Options
-h, --help Gets help for set.
Options inherited from parent commands
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
See also
azd config: Manage the Azure Developer CLI user configuration.
Removes a configuration in the configuration path.
The default value of the config directory is:
$HOME/.azd on Linux and macOS
%USERPROFILE%\.azd on Windows
The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.
azd config unset <path> [flags]
Examples
azd config unset defaults.location
Options
-h, --help Gets help for unset.
Options inherited from parent commands
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
See also
azd config: Manage the Azure Developer CLI user configuration.
Deploy the app's code to Azure.
When no --service value is specified, all services in the azure.yaml file (found in the root of your project) are deployed.
Examples:
azd deploy
azd deploy --service api
azd deploy --service web
After the deployment is complete, the endpoint is printed. To start the service, select the endpoint or paste it in a browser.
azd deploy [flags]
Options
-e, --environment string The name of the environment to use.
-h, --help Gets help for deploy.
-o, --output string The output format (the supported formats are json, none). (default "none")
--service string Deploys a specific service (when the string is unspecified, all services that are listed in the azure.yaml file are deployed).
Options inherited from parent commands
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
-e, --environment string The name of the environment to use.
--force Does not require confirmation before it deletes resources.
-h, --help Gets help for down.
-o, --output string The output format (the supported formats are json, none). (default "none")
--purge Does not require confirmation before it permanently deletes resources that are soft-deleted by default (for example, key vaults).
Options inherited from parent commands
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
With this command group, you can create a new environment or get, set, and list your app environments. An app can have multiple environments (for example, dev, test, prod), each with a different configuration (that is, connectivity information) for accessing Azure resources.
You can find all environment configurations under the .azure\<environment-name> directories. The environment name is stored as the AZURE_ENV_NAME environment variable in the .azure\<environment-name>\directory\.env file.
Options
-h, --help Gets help for env.
Options inherited from parent commands
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
-e, --environment string The name of the environment to use.
-h, --help Gets help for get-values.
-o, --output string The output format (the supported formats are json, dotenv). (default "dotenv")
Options inherited from parent commands
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
-h, --help Gets help for list.
-o, --output string The output format (the supported formats are json, table). (default "table")
Options inherited from parent commands
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
-h, --help Gets help for new.
-l, --location string Azure location for the new environment
--subscription string Name or ID of an Azure subscription to use for the new environment
Options inherited from parent commands
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
Refresh environment settings by using information from a previous infrastructure provision.
azd env refresh [flags]
Options
-e, --environment string The name of the environment to use.
-h, --help Gets help for refresh.
-o, --output string The output format (the supported formats are json, none). (default "none")
Options inherited from parent commands
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
-e, --environment string The name of the environment to use.
-h, --help Gets help for set.
Options inherited from parent commands
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
Azure location: The Azure location where your resources will be deployed.
Azure subscription: The Azure subscription where your resources will be deployed.
Depending on what Azure resources are created, running this command might take a while. To view progress, go to the Azure portal and search for the resource group that contains your environment name.
azd infra create [flags]
Options
-e, --environment string The name of the environment to use.
-h, --help Gets help for create.
--no-progress Suppresses progress information.
-o, --output string The output format (the supported formats are json, none). (default "none")
Options inherited from parent commands
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
-e, --environment string The name of the environment to use.
--force Does not require confirmation before it deletes resources.
-h, --help Gets help for delete.
-o, --output string The output format (the supported formats are json, none). (default "none")
--purge Does not require confirmation before it permanently deletes resources that are soft-deleted by default (for example, key vaults).
Options inherited from parent commands
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
When no template is supplied, you can optionally select an Azure Developer CLI template for cloning. Otherwise, azd init initializes the current directory and creates resources so that your project is compatible with Azure Developer CLI.
When a template is provided, the sample code is cloned to the current directory.
azd init [flags]
Options
-b, --branch string The template branch to initialize from.
-e, --environment string The name of the environment to use.
-h, --help Gets help for init.
-l, --location string Azure location for the new environment
--subscription string Name or ID of an Azure subscription to use for the new environment
-t, --template string The template to use when you initialize the project. You can use Full URI, <owner>/<repository>, or <repository> if it's part of the azure-samples organization.
Options inherited from parent commands
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
When run without any arguments, log in interactively using a browser. To log in using a device code, pass
--use-device-code.
To log in as a service principal, pass --client-id and --tenant-id as well as one of: --client-secret,
--client-certificate, --federated-credential, or --federated-credential-provider.
azd login [flags]
Options
--check-status Checks the log-in status instead of logging in.
--client-certificate string The path to the client certificate for the service principal to authenticate with.
--client-id string The client id for the service principal to authenticate with.
--client-secret string The client secret for the service principal to authenticate with. Set to the empty string to read the value from the console.
--federated-credential string The federated token for the service principal to authenticate with. Set to the empty string to read the value from the console.
--federated-credential-provider string The provider to use to acquire a federated token to authenticate with.
-h, --help Gets help for login.
-o, --output string The output format (the supported formats are json, none). (default "none")
--redirect-port int Choose the port to be used as part of the redirect URI during interactive login.
--tenant-id string The tenant id or domain name to authenticate with.
--use-device-code When true, log in by using a device code instead of a browser.
Options inherited from parent commands
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
-e, --environment string The name of the environment to use.
-h, --help Gets help for monitor.
--live Open a browser to Application Insights Live Metrics. Live Metrics is currently not supported for Python apps.
--logs Open a browser to Application Insights Logs.
--overview Open a browser to Application Insights Overview Dashboard.
Options inherited from parent commands
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
The Azure Developer CLI template includes a GitHub Actions and an Azure Pipeline configuration file in the .github/workflows and .azdo/pipelines directories respectively. The configuration file deploys your app whenever code is pushed to the main branch.
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
See also
azd pipeline config: Create and configure your deployment pipeline by using GitHub Actions or Azure Pipelines.
--auth-type string The authentication type used between the pipeline provider and Azure for deployment (Only valid for GitHub provider)
-e, --environment string The name of the environment to use.
-h, --help Gets help for config.
--principal-name string The name of the service principal to use to grant access to Azure resources as part of the pipeline.
--principal-role string The role to assign to the service principal. (default "contributor")
--provider string The pipeline provider to use (github for Github Actions and azdo for Azure Pipelines). (default "github")
--remote-name string The name of the git remote to configure the pipeline to run on. (default "origin")
Options inherited from parent commands
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
See also
azd pipeline: Manage GitHub Actions or Azure Pipelines.
Azure location: The Azure location where your resources will be deployed.
Azure subscription: The Azure subscription where your resources will be deployed.
Depending on what Azure resources are created, running this command might take a while. To view progress, go to the Azure portal and search for the resource group that contains your environment name.
azd provision [flags]
Options
-e, --environment string The name of the environment to use.
-h, --help Gets help for provision.
--no-progress Suppresses progress information.
-o, --output string The output format (the supported formats are json, none). (default "none")
Options inherited from parent commands
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
-e, --environment string The name of the environment to use.
-h, --help Gets help for restore.
--service string Restores a specific service (when the string is unspecified, all services that are listed in the azure.yaml file are restored).
Options inherited from parent commands
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
-h, --help Gets help for list.
-o, --output string The output format (the supported formats are json, table). (default "table")
Options inherited from parent commands
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
-h, --help Gets help for show.
-o, --output string The output format (the supported formats are json, table). (default "table")
Options inherited from parent commands
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
Initialize the app, provision Azure resources, and deploy your project with a single command.
Synopsis
Initialize the project (if the project folder has not been initialized or cloned from a template), provision Azure resources, and deploy your project with a single command.
This command executes the following in one step:
azd init
azd provision
azd deploy
When no template is supplied, you can optionally select an Azure Developer CLI template for cloning. Otherwise, running azd up initializes the current directory so that your project is compatible with Azure Developer CLI.
azd up [flags]
Options
-b, --branch string The template branch to initialize from.
-e, --environment string The name of the environment to use.
-h, --help Gets help for up.
-l, --location string Azure location for the new environment
--no-progress Suppresses progress information.
-o, --output string The output format (the supported formats are json, none). (default "none")
--service string Deploys a specific service (when the string is unspecified, all services that are listed in the azure.yaml file are deployed).
--subscription string Name or ID of an Azure subscription to use for the new environment
-t, --template string The template to use when you initialize the project. You can use Full URI, <owner>/<repository>, or <repository> if it's part of the azure-samples organization.
Options inherited from parent commands
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
-h, --help Gets help for version.
-o, --output string The output format (the supported formats are json, none). (default "none")
Options inherited from parent commands
-C, --cwd string Sets the current working directory.
--debug Enables debugging and diagnostics logging.
--no-prompt Accepts the default value instead of prompting, or it fails if there is no default.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes issue when user runs
azd login --tenant-id <X>, but has MFA policy preventing access to home tenant.azd logincurrently reports an error.