This file contains 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
terraform --version |
This file contains 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
## Requires jq .. to install see: https://stedolan.github.io/jq/download/ | |
# set some environment variables to use to create the service principal | |
export SUBSCRIPTION_ID=3464892e-e827-4752-bad5-b4f93c00dbbe | |
export PROJECT_NAME="wus2-azure-aks-terraform-demo" | |
az account set --subscription="${SUBSCRIPTION_ID}" | |
# create the service principal to the subscription scope and save it to an auth file | |
TF_SERVICE_PRINCIPAL=$(az ad sp create-for-rbac --skip-assignment --role 'Contributor' --name rbac-tf-$PROJECT_NAME --output json --scopes="/subscriptions/${SUBSCRIPTION_ID}") |
This file contains 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
resource "azurerm_kubernetes_cluster" "k8s" { | |
name = var.cluster_name | |
location = azurerm_resource_group.rg_aks.location | |
resource_group_name = azurerm_resource_group.rg_aks.name | |
dns_prefix = var.dns_prefix | |
linux_profile { | |
admin_username = var.admin_name | |
ssh_key { |
This file contains 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
#Requires -Version 5.1 | |
#Requires -Modules Az.Resources, Az.Storage | |
<# | |
.SYNOPSIS | |
Deploys the resource using the boilerplate template | |
.DESCRIPTION | |
Deploys the boilerplate template to the resource group. | |
.PARAMETER SubscriptionID | |
The Azure Subscription ID, such as "9f241d6e-16e2-4b2b-a485-cc546f04799b". Uses the current subscription as the default. | |
.PARAMETER ResourceGroupName |
This file contains 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
wt -p "Command Prompt" `; split-pane -p "Windows PowerShell" `; split-pane -H wsl.exe |
This file contains 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
REGION_ABBR="wu2" | |
ENVIRONMENT="dev" | |
PROJECT="azdays" | |
ITERATION="01" | |
LOCATION="West US 2" | |
RESOURCE_GROUP_NAME=rg-${REGION_ABBR}-${ENVIRONMENT}-${PROJECT}-${ITERATION} | |
TAGS=("Cost Center=AzDays" "Location=West US 2") | |
az group create --name $RESOURCE_GROUP_NAME --location "$LOCATION" --tags "${TAGS[@]}" |
This file contains 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 the root path for extensions | |
code --extensions-dir <dir> | |
# List the installed extensions. | |
code --list-extensions | |
# Install extension | |
code --install-extension (<extension-id> | <extension-vsix-path>) | |
# Uninstalls an extension. |
This file contains 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-Module azuread | |
New-AzureADGroup -Description "Log Analytics Reader Group" -DisplayName "Log Analytics Reader Group" -MailEnabled $false -SecurityEnabled $true -MailNickName "LogAnalyticsReaderGroup" |
This file contains 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
#Requires -Version 7.0 | |
#Requires -Modules PowerShellGet, Az.Resources, Az.Security | |
<# | |
.SYNOPSIS | |
Sets up Security Center and the admin alerts for the subscription | |
.DESCRIPTION | |
Automatically sets Security Center standard tier to the subscription. | |
.PARAMETER OrganizationName | |
Used to create the management group name | |
.PARAMETER LogAnalyticsWorkplaceId |
This file contains 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
#Requires -Version 7.0 | |
#Requires -Modules PowerShellGet, Az.Resources | |
<# | |
.SYNOPSIS | |
Creates a management group | |
.DESCRIPTION | |
Creates a management group | |
.PARAMETER OrganizationName | |
Used to create the management group name | |
.OUTPUTS |
OlderNewer