Skip to content

Instantly share code, notes, and snippets.

View krnese's full-sized avatar
💭
Living the dream

Kristian Nese krnese

💭
Living the dream
View GitHub Profile
@krnese
krnese / Subnet
Created August 8, 2023 12:12
Compliant subnet
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"vnetName": {
"defaultValue": "knvnet-eastus",
"type": "String"
},
"nsgName": {
"defaultValue": "nsg-eastus",
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"addressPrefix": {
"type": "string",
"defaultValue": "192.168.0.0/16"
},
"vnetName": {
"type": "string",
@krnese
krnese / subDelegation
Created December 12, 2022 15:57
Testing
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"vNetName": {
"type": "string",
"defaultValue": "ppvnet"
},
"vNetCidr": {
"type": "string",
@krnese
krnese / Region Lockdown
Created October 6, 2022 15:14
PolicyAssignment
{
"$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"policyAssignmentEnforcementMode": {
"type": "string",
"allowedValues": [
"Default",
"DoNotEnforce"
],
@krnese
krnese / ARM template sample
Created May 24, 2020 11:17
Enable diagnostics of AAD to Log Analytics
{
"$schema": "https://schema.management.azure.com/schemas/2019-08-01/tenantDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"logAnalyticsResourceId": {
"type": "string",
"metadata": {
"description": "Provide the resourceId to your Log Analytics workspace that will receive the AAD auding/sign-in logs."
}
}
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"managementGroupId": {
"type": "string",
"defaultValue": "/providers/Microsoft.Management/managementGroups/paris"
},
"location": {
"type": "string",
@krnese
krnese / vmCondition
Last active December 8, 2021 04:54
This ARM template shows how to use conditions and logical/comparison functions to dynamically create windows/linux for prod/non-prod
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"vmNamePrefix": {
"type": "string",
"defaultValue": "VM",
"metadata": {
"description": "Assing a prefix for the VM you will create."
}
{
"$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"resources": [
{
"type": "Microsoft.Authorization/policyDefinitions",
"apiVersion": "2019-09-01",
"name": "vnet-dns",
"properties": {
@krnese
krnese / DomainJoinVMParams
Created February 15, 2021 17:29
DomainJoinVMParams
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"vmSku": {
"value": "Standard_D2_v2"
},
"windowsOsVersion": {
"value": "2019-Datacenter"
},
@krnese
krnese / DomainJoinVM
Created February 15, 2021 17:28
DomainJoinVM
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"vmSku": {
"type": "string",
"defaultValue": "Standard_D2_v2"
},
"windowsOsVersion": {
"type": "string",