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
trigger: | |
branches: | |
include: | |
- master | |
- refs/tags/* | |
pr: | |
- master | |
pool: | |
vmImage: 'VS2017-Win2016' |
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
# Install kubectl using Azure CLI | |
az aks install-cli |
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
# Login to Azure using the CLI | |
az login --use-device-code | |
# Create the resource group for the AKS cluster | |
az group create --name "aks-demo-rg" --location "southeastasia" |
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
# Login to Azure Subscription | |
Login-AzureRmAccount | |
# Get a reference to the resource group | |
$rg = Get-AzureRmResourceGroup -Name "az-policy-rg" | |
# Get a referecen to the Azure Policy Definition | |
$policyDef = Get-AzureRmPolicyDefinition | Where-Object { $_.Properties.DisplayName -eq "Audit VMs that do not use managed disks" } | |
# Create the new Policy Assignment for the Resource Group |
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
# Login to Azure | |
az login --use-device-code | |
# Get Regerence to Resource Group | |
$rgId = az group show --name "az-policy-rg" --query "id" --output tsv | |
# Get Reference to the Azure Policy Definition | |
$policyName = az policy definition list --query "[?displayName == 'Audit use of classic virtual machines'].name" --output tsv | |
# Assign the policy |
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
# Login to Azure Subscription | |
Login-AzureRmAccount | |
# Check the registration Status of the Resource Provider | |
Get-AzureRmResourceProvider -ListAvailable | Where-Object { $_.ProviderNamespace -eq "Microsoft.Compute" } | |
# Register the Microsoft.Compute Resource Provider | |
Register-AzureRmResourceProvider -ProviderNamespace "Microsoft.Compute" |
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
# Login to Azure | |
az login --use-device-code | |
# Check the registration Status of the Resource Provider | |
az provider list --query "[?namespace == 'Microsoft.Compute']" --output table | |
# Register the Microsoft.Compute Resource Provider | |
az provider register --namespace "Microsoft.Compute" |
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
var oneService = new ServiceDescriptor(typeof(IOneService), typeof(OneService), ServiceLifetime.Scoped); | |
services.Add(oneService); |