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 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
# 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
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
# Add tag to Azure Resource Group | |
az group update --name "Tags-PRD-Web" --set tags.Department=Operations |
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
Set-AzureRmResourceGroup -Name "Tags-DEV-Web" -Tag @{ Department = "Development" } |