|
2 | 2 | title: Module setting for Bicep config
|
3 | 3 | description: Describes how to customize configuration values for modules in Bicep deployments.
|
4 | 4 | ms.topic: conceptual
|
5 |
| -ms.date: 04/08/2022 |
| 5 | +ms.date: 01/11/2023 |
6 | 6 | ---
|
7 | 7 |
|
8 | 8 | # Add module settings in the Bicep config file
|
9 | 9 |
|
10 |
| -In a **bicepconfig.json** file, you can create aliases for module paths and configure credential precedence for restoring a module. |
| 10 | +In a **bicepconfig.json** file, you can create aliases for module paths and configure profile and credential precedence for publishing and restoring modules. |
11 | 11 |
|
12 |
| -This article describes the settings that are available for working with [modules](modules.md). |
| 12 | +This article describes the settings that are available for working with [Bicep modules](modules.md). |
13 | 13 |
|
14 | 14 | ## Aliases for modules
|
15 | 15 |
|
@@ -120,9 +120,54 @@ You can override the public module registry alias definition in the bicepconfig.
|
120 | 120 | }
|
121 | 121 | ```
|
122 | 122 |
|
123 |
| -## Credentials for publishing/restoring modules |
| 123 | +## Configure profiles and credentials |
124 | 124 |
|
125 |
| -To [publish](bicep-cli.md#publish) modules to a private module registry or to [restore](bicep-cli.md#restore) external modules to the local cache, the account must have the correct permissions to access the registry. You can configure the credential precedence for authenticating to the registry. By default, Bicep uses the credentials from the user authenticated in Azure CLI or Azure PowerShell. To customize the credential precedence, see [Add credential precedence to Bicep config](bicep-config.md#credential-precedence). |
| 125 | +To [publish](bicep-cli.md#publish) modules to a private module registry or to [restore](bicep-cli.md#restore) external modules to the local cache, the account must have the correct permissions to access the registry. You can configure the profile and the credential precedence for authenticating to the registry. By default, Bicep uses the `AzureCloud` profile and the credentials from the user authenticated in Azure CLI or Azure PowerShell. You can customize `currentProfile` and `credentialPrecedence` in the config file. |
| 126 | + |
| 127 | +```json |
| 128 | +{ |
| 129 | + "cloud": { |
| 130 | + "currentProfile": "AzureCloud", |
| 131 | + "profiles": { |
| 132 | + "AzureCloud": { |
| 133 | + "resourceManagerEndpoint": "https://management.azure.com", |
| 134 | + "activeDirectoryAuthority": "https://login.microsoftonline.com" |
| 135 | + }, |
| 136 | + "AzureChinaCloud": { |
| 137 | + "resourceManagerEndpoint": "https://management.chinacloudapi.cn", |
| 138 | + "activeDirectoryAuthority": "https://login.chinacloudapi.cn" |
| 139 | + }, |
| 140 | + "AzureUSGovernment": { |
| 141 | + "resourceManagerEndpoint": "https://management.usgovcloudapi.net", |
| 142 | + "activeDirectoryAuthority": "https://login.microsoftonline.us" |
| 143 | + } |
| 144 | + }, |
| 145 | + "credentialPrecedence": [ |
| 146 | + "AzureCLI", |
| 147 | + "AzurePowerShell" |
| 148 | + ] |
| 149 | + } |
| 150 | +} |
| 151 | +``` |
| 152 | + |
| 153 | +The available profiles are: |
| 154 | + |
| 155 | +- AzureCloud |
| 156 | +- AzureChinaCloud |
| 157 | +- AzureUSGovernment |
| 158 | + |
| 159 | +You can customize these profiles, or add new profiles for your on-premises environments. |
| 160 | + |
| 161 | +The available credential types are: |
| 162 | + |
| 163 | +- AzureCLI |
| 164 | +- AzurePowerShell |
| 165 | +- Environment |
| 166 | +- ManagedIdentity |
| 167 | +- VisualStudio |
| 168 | +- VisualStudioCode |
| 169 | + |
| 170 | +[!INCLUDE [vscode authentication](../../../includes/resource-manager-vscode-authentication.md)] |
126 | 171 |
|
127 | 172 | ## Next steps
|
128 | 173 |
|
|
0 commit comments