Skip to content

Instantly share code, notes, and snippets.

💭
Living the dream

Kristian Nese krnese

💭
Living the dream
Block or report user

Report or block krnese

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View policy
{
"properties": {
"policyType": "Custom",
"mode": "All",
"parameters": {
"logAnalyticsEurope": {
"type": "string",
"metadata": {
"displayName": "Log Analyitcs workspace in Europe",
"description": "Select the Log Analytics workspace from dropdown list",
View gist:3ed46a8b2a9e4be10377b70d830e57bb
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"actionGroupId": {
"defaultValue": "/subscriptions/4b7561c1-24a7-468f-8b80-bf79cc29d48b/resourceGroups/m2-oms-europe/providers/Microsoft.Insights/actionGroups/defaultGroup",
"type": "string",
"metadata": {
"description": "Action group resource Id"
}
View gist:3c8af533f48b25e9ca11411956698b12
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"foo": {
"type": "object",
"defaultValue": {
"vnetName": 0,
"vnetAddressPrefix": "10.1.0.0/20",
"dnsServers": [
View gist:05a9b8945ca2d2091ee166f27d5d2f49
{
"$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."
}
View snippet to showcase OMS + SVC MAP + DSC relationship & sequencing order
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"apiVersion": "2017-03-30",
"name": "[concat(parameters('vmNamePrefix'), parameters('platform'), copyIndex(), '/OMS')]",
"location": "[resourceGroup().location]",
"copy": {
"name": "[concat(parameters('vmNamePrefix'), parameters('platform'), 'OMS')]",
"count": "[parameters('instanceCount')]"
},
"dependsOn": [
@krnese
krnese / automation - reference() and listKeys() support
Created Sep 8, 2017
Azure Automation - reference() and listKeys() example
View automation - reference() and listKeys() support
{
"$schema": "http://schemas.microsoft.org/azure/deploymentTemplate?api-version=2015-01-01-preview#",
"contentVersion": "1.0",
"parameters": {
"accountName": {
"type": "string",
"metadata": {
"description": "The name of the Azure Automation account to deploy to."
}
}
@krnese
krnese / vmCondition
Last active Jun 13, 2019
This ARM template shows how to use conditions and logical/comparison functions to dynamically create windows/linux for prod/non-prod
View vmCondition
{
"$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."
}
View omsAndServiceMap
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"instanceCount": {
"type": "int",
"defaultValue": "2",
"maxValue": 10,
"metadata": {
"description": "Specify the number of VMs to create"
View OMS VM extension
{
"condition": "[equals(parameters('platform'), 'Windows')]",
"type": "Microsoft.Compute/virtualMachines/extensions",
"apiVersion": "2016-03-30",
"name": "[concat(parameters('vmNameSuffix'), 'VM', copyIndex(), '/OMS')]",
"location": "[resourceGroup().location]",
"copy": {
"name": "[concat(parameters('vmNameSuffix'), 'VM', 'OMS')]",
"count": "[parameters('instanceCount')]"
},
View Import Automation PS modules
"copy": {
"name": "modulesCopy",
"count": "[length(variables('assets').psModules)]",
"batchSize": 4,
"mode": "Serial"
}
You can’t perform that action at this time.