Skip to content

Commit b3eb3b3

Browse files
committed
more indentation tweaks
1 parent 695576a commit b3eb3b3

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

articles/azure-app-configuration/howto-integrate-azure-managed-service-identity.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -132,41 +132,41 @@ To set up a managed identity in the portal, you first create an application and
132132
133133
1. To use both App Configuration values and Key Vault references, update *Program.cs* as shown below. This code creates a new `KeyVaultClient` using an `AzureServiceTokenProvider` and passes this reference to a call to the `UseAzureKeyVault` method.
134134
135-
### [.NET Core 2.x](#tab/core2x)
135+
### [.NET Core 2.x](#tab/core2x)
136136
137-
```csharp
138-
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
139-
WebHost.CreateDefaultBuilder(args)
140-
.ConfigureAppConfiguration((hostingContext, config) =>
141-
{
142-
var settings = config.Build();
143-
AzureServiceTokenProvider azureServiceTokenProvider = new AzureServiceTokenProvider();
144-
KeyVaultClient kvClient = new KeyVaultClient(new KeyVaultClient.AuthenticationCallback(azureServiceTokenProvider.KeyVaultTokenCallback));
145-
146-
config.AddAzureAppConfiguration(options => options.Connect(new Uri(settings["AppConfig:Endpoint"]), new ManagedIdentityCredential()).UseAzureKeyVault(kvClient));
147-
})
148-
.UseStartup<Startup>();
149-
```
137+
```csharp
138+
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
139+
WebHost.CreateDefaultBuilder(args)
140+
.ConfigureAppConfiguration((hostingContext, config) =>
141+
{
142+
var settings = config.Build();
143+
AzureServiceTokenProvider azureServiceTokenProvider = new AzureServiceTokenProvider();
144+
KeyVaultClient kvClient = new KeyVaultClient(new KeyVaultClient.AuthenticationCallback(azureServiceTokenProvider.KeyVaultTokenCallback));
145+
146+
config.AddAzureAppConfiguration(options => options.Connect(new Uri(settings["AppConfig:Endpoint"]), new ManagedIdentityCredential()).UseAzureKeyVault(kvClient));
147+
})
148+
.UseStartup<Startup>();
149+
```
150150
151-
### [.NET Core 3.x](#tab/core3x)
152-
153-
```csharp
154-
public static IHostBuilder CreateHostBuilder(string[] args) =>
155-
Host.CreateDefaultBuilder(args)
156-
.ConfigureWebHostDefaults(webBuilder =>
157-
webBuilder.ConfigureAppConfiguration((hostingContext, config) =>
158-
{
159-
var settings = config.Build();
160-
AzureServiceTokenProvider azureServiceTokenProvider = new AzureServiceTokenProvider();
161-
KeyVaultClient kvClient = new KeyVaultClient(new KeyVaultClient.AuthenticationCallback(azureServiceTokenProvider.KeyVaultTokenCallback));
162-
163-
config.AddAzureAppConfiguration(options => options.Connect(new Uri(settings["AppConfig:Endpoint"]), new ManagedIdentityCredential()).UseAzureKeyVault(kvClient));
164-
})
165-
.UseStartup<Startup>());
166-
```
167-
---
151+
### [.NET Core 3.x](#tab/core3x)
152+
153+
```csharp
154+
public static IHostBuilder CreateHostBuilder(string[] args) =>
155+
Host.CreateDefaultBuilder(args)
156+
.ConfigureWebHostDefaults(webBuilder =>
157+
webBuilder.ConfigureAppConfiguration((hostingContext, config) =>
158+
{
159+
var settings = config.Build();
160+
AzureServiceTokenProvider azureServiceTokenProvider = new AzureServiceTokenProvider();
161+
KeyVaultClient kvClient = new KeyVaultClient(new KeyVaultClient.AuthenticationCallback(azureServiceTokenProvider.KeyVaultTokenCallback));
162+
163+
config.AddAzureAppConfiguration(options => options.Connect(new Uri(settings["AppConfig:Endpoint"]), new ManagedIdentityCredential()).UseAzureKeyVault(kvClient));
164+
})
165+
.UseStartup<Startup>());
166+
```
167+
---
168168
169-
You can now access Key Vault references just like any other App Configuration key. The config provider will use the `KeyVaultClient` that you configured to authenticate to Key Vault and retrieve the value.
169+
You can now access Key Vault references just like any other App Configuration key. The config provider will use the `KeyVaultClient` that you configured to authenticate to Key Vault and retrieve the value.
170170
171171
[!INCLUDE [Prepare repository](../../includes/app-service-deploy-prepare-repo.md)]
172172

0 commit comments

Comments
 (0)