Skip to content

Instantly share code, notes, and snippets.

View wvanbesien's full-sized avatar

Ward van Besien wvanbesien

  • Microsoft
  • Melbourne
View GitHub Profile
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureAppConfiguration((webBuilder) => {
var config = webBuilder.Build();
var mode = (KeyVaultUsage)Enum.Parse(typeof(KeyVaultUsage), (config["Secrets:Mode"]));
if (mode != KeyVaultUsage.UseLocalSecretStore)
{
KeyVaultOptions kvc = config.GetSection("Secrets").Get<KeyVaultOptions>();
if (mode == KeyVaultUsage.UseClientSecret)
{
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
{
"apiVersion": "2018-06-01",
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('VM_Name'),'/config-server')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', parameters('VM_Name'))]"
],
"tags": {
"displayName": "config-server"
{
"apiVersion": "2018-06-01",
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('VM_Name'),'/config-server')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', parameters('VM_Name'))]"
],
"tags": {
"displayName": "config-server"
<#
.SYNOPSIS
This function gives some cheap flattery.
.DESCRIPTION
Use this command to give some cheap flattery. the name parameter is mandatory
.PARAMETER name
Specify the name that should be used for the compliment
Process {
if ($PSCmdlet.ShouldProcess($name)) {
Write-Host "You are great, $name"
}
}
<#
.SYNOPSIS
This function gives some cheap flattery.
.DESCRIPTION
Use this command to give some cheap flattery. the name parameter is mandatory
.PARAMETER name
Specify the name that should be used for the compliment
.EXAMPLE
function new-compliment {
param(
$name
)
Write-Host "You are great, $name"
}
#
# Module manifest for module 'au.com.kloud.demo'
#
# Generated by: Ward van Besien
#
# Generated on: 04/03/18
#
@{