<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>json Archives - Apostolidis Cloud Corner</title>
	<atom:link href="https://www.cloudcorner.gr/tag/json/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.cloudcorner.gr/tag/json/</link>
	<description>Remarks from a Cloud Architect encounters</description>
	<lastBuildDate>Tue, 24 Oct 2023 08:44:29 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://www.cloudcorner.gr/wp-content/uploads/2021/04/cropped-cloudcorner2-32x32.png</url>
	<title>json Archives - Apostolidis Cloud Corner</title>
	<link>https://www.cloudcorner.gr/tag/json/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Deploy VM from Azure SIG in new Resource Group</title>
		<link>https://www.cloudcorner.gr/microsoft/azure/deploy-vm-from-azure-sig-in-new-resource-group/</link>
					<comments>https://www.cloudcorner.gr/microsoft/azure/deploy-vm-from-azure-sig-in-new-resource-group/#comments</comments>
		
		<dc:creator><![CDATA[Pantelis Apostolidis]]></dc:creator>
		<pubDate>Thu, 04 Feb 2021 15:03:12 +0000</pubDate>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[arm template]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[azurerm]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[nsg]]></category>
		<category><![CDATA[resource group]]></category>
		<category><![CDATA[SIG]]></category>
		<category><![CDATA[virtual machine]]></category>
		<category><![CDATA[vm]]></category>
		<category><![CDATA[vnet]]></category>
		<guid isPermaLink="false">https://www.e-apostolidis.gr/?p=3753</guid>

					<description><![CDATA[<p>Deploy VM from Azure SIG in new Resource Group Pantelis ApostolidisPantelis Apostolidis is a Sr. Specialist, Azure at Microsoft and</p>
<p>The post <a href="https://www.cloudcorner.gr/microsoft/azure/deploy-vm-from-azure-sig-in-new-resource-group/">Deploy VM from Azure SIG in new Resource Group</a> appeared first on <a href="https://www.cloudcorner.gr">Apostolidis Cloud Corner</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Deploy VM from Azure SIG in new Resource Group</h2>



<p>This is a template that first creates a Resource Group, and then it deploys a Virtual Machine from an image version of the Shared Image Gallery. It provides the Public IP and Hostname for outputs. </p>
<p>Currently it only asks for the SIG image version and an environment value to create the naming convention of the resources. </p>
<p>GitHub: <a href="https://github.com/proximagr/ARMTemplates/blob/master/VM-from-SIG-in-new-RG/VM-from-SIG-in-new-RG.json">https://github.com/proximagr/ARMTemplates/blob/master/VM-from-SIG-in-new-RG/VM-from-SIG-in-new-RG.json</a></p>



<pre class="EnlighterJSRAW" data-enlighter-language="json" data-enlighter-theme="bootstrap4">{
    "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "galleryimageversion": {
            "type": "string",
            "defaultValue": "10.0.2"
        },
        "envname": {
            "type": "string",
            "defaultValue": "test"
        }
    },
    "variables": {
        "basename": "[concat(parameters('envname'),substring(deployment().name,0,6))]",
        "rgname": "[concat('rg-', substring(variables('basename'), 0, 10))]",
        "region": "francecentral"
    },
    "resources": [
        {
            "name": "[variables('rgname')]",
            "type": "Microsoft.Resources/resourceGroups",
            "apiVersion": "2019-10-01",
            "location": "[variables('region')]",
            "dependsOn": [
            ],
            "tags": {
            }
        },
        {
            "type": "Microsoft.Resources/deployments",
            "resourceGroup": "[variables('rgname')]",
            "dependsOn": [
                "[resourceId('Microsoft.Resources/resourceGroups',variables('rgname'))]"
            ],
            "apiVersion": "2019-10-01",
            "name": "nestedTemplate1",
            "properties": {
                "expressionEvaluationOptions": {
                    "scope": "inner"
                },
                "mode": "Incremental",
                "parameters": {
                    "galleryImageVersionName": {
                        "value": "[parameters('galleryimageversion')]"
                    },
                    "envname": {
                        "value": "[parameters('envname')]"
                    }

                },
                "template": {
                    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
                    "contentVersion": "1.0.0.0",
                    "parameters": {
                        "galleryImageVersionName": {
                            "type": "string"
                        },
                        "envname": {
                            "type": "string"
                        }
                    },
                    "variables": {
                        "basename": "[concat(parameters('envname'),substring(deployment().name,0,6))]",
                        "pubipname": "[concat( 'pip-',variables('basename'))]",
                        "pubipdns": "[concat( 'vm-',variables('basename'))]",
                        "region": "francecentral",
                        "adminUsername": "uiadmin",
                        "adminPassword": "ThisIs1Password!",
                        "galleryName": "demosig",
                        "galleryImageDefinitionName": "demoid",
                        "nicName": "[concat( 'nic-',variables('basename'))]",
                        "addressPrefix": "10.0.0.0/24",
                        "subnetName": "[concat( 'sub-',variables('basename'))]",
                        "subnetPrefix": "10.0.0.0/24",
                        "vmName": "[concat( 'vm-',variables('basename'))]",
                        "virtualNetworkName": "[concat( 'vnet-',variables('basename'))]",
                        "subnetRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnetName'))]",
                        "networkSecurityGroupName": "[concat( 'nsg-',variables('basename'))]"
                    },
                    "resources": [
                        {
                            "name": "[variables('pubipname')]",
                            "type": "Microsoft.Network/publicIPAddresses",
                            "apiVersion": "2019-11-01",
                            "location": "[variables('region')]",
                            "tags": {
                                "displayName": "publicIPAddress1"
                            },
                            "properties": {
                                "publicIPAllocationMethod": "Static",
                                "dnsSettings": {
                                    "domainNameLabel": "[variables('pubipdns')]"
                                }
                            }
                        },
                        {
                            "comments": "Simple Network Security Group for subnet [variables('subnetName')]",
                            "type": "Microsoft.Network/networkSecurityGroups",
                            "apiVersion": "2019-08-01",
                            "name": "[variables('networkSecurityGroupName')]",
                            "location": "[variables('region')]",
                            "properties": {
                                "securityRules": [
                                    {
                                        "name": "default-allow-22",
                                        "properties": {
                                            "priority": 1000,
                                            "access": "Allow",
                                            "direction": "Inbound",
                                            "destinationPortRange": "22",
                                            "protocol": "Tcp",
                                            "sourceAddressPrefix": "*",
                                            "sourcePortRange": "*",
                                            "destinationAddressPrefix": "*"
                                        }
                                    },
                                    {
                                        "name": "default-allow-3389",
                                        "properties": {
                                            "priority": 1001,
                                            "access": "Allow",
                                            "direction": "Inbound",
                                            "destinationPortRange": "3389",
                                            "protocol": "Tcp",
                                            "sourceAddressPrefix": "*",
                                            "sourcePortRange": "*",
                                            "destinationAddressPrefix": "*"
                                        }
                                    }
                                ]
                            }
                        },
                        {
                            "type": "Microsoft.Network/virtualNetworks",
                            "name": "[variables('virtualNetworkName')]",
                            "apiVersion": "2016-03-30",
                            "location": "[variables('region')]",
                            "dependsOn": [
                                "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
                            ],
                            "properties": {
                                "addressSpace": {
                                    "addressPrefixes": [
                                        "[variables('addressPrefix')]"
                                    ]
                                },
                                "subnets": [
                                    {
                                        "name": "[variables('subnetName')]",
                                        "properties": {
                                            "addressPrefix": "[variables('subnetPrefix')]",
                                            "networkSecurityGroup": {
                                                "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
                                            }
                                        }
                                    }
                                ]
                            }
                        },
                        {
                            "type": "Microsoft.Network/networkInterfaces",
                            "name": "[variables('nicName')]",
                            "apiVersion": "2016-03-30",
                            "location": "[variables('region')]",
                            "properties": {
                                "ipConfigurations": [
                                    {
                                        "name": "ipconfig1",
                                        "properties": {
                                            "privateIPAllocationMethod": "Dynamic",
                                            "publicIPAddress": {
                                                "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('pubipname'))]"
                                            },
                                            "subnet": {
                                                "id": "[variables('subnetRef')]"
                                            }
                                        }
                                    }
                                ]
                            },
                            "dependsOn": [
                                "[resourceId('Microsoft.Network/publicIPAddresses/', variables('pubipname'))]",
                                "[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
                            ]
                        },
                        {
                            "type": "Microsoft.Compute/virtualMachines",
                            "name": "[variables('vmName')]",
                            "apiVersion": "2019-07-01",
                            "location": "[variables('region')]",
                            "properties": {
                                "hardwareProfile": {
                                    "vmSize": "Standard_F8s_v2"
                                },
                                "osProfile": {
                                    "computerName": "[variables('vmName')]",
                                    "adminUsername": "[variables('adminUsername')]",
                                    "adminPassword": "[variables('adminPassword')]"
                                },
                                "storageProfile": {
                                    "imageReference": {
                                        "id": "[resourceId('Microsoft.Compute/galleries/images/versions', variables('galleryName'), variables('galleryImageDefinitionName'), parameters('galleryImageVersionName'))]"
                                    }
                                },
                                "networkProfile": {
                                    "networkInterfaces": [
                                        {
                                            "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
                                        }
                                    ]
                                }
                            },
                            "dependsOn": [
                                "[resourceId('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
                            ]
                        }
                    ],
                    "outputs": {
                        "publicipn": {
                            "type": "string",
                            "value": "[reference(variables('pubipname')).dnsSettings.fqdn]"
                        },
                        "publicipa": {
                            "type": "string",
                            "value": "[reference(variables('pubipname')).ipAddress]"
                        }
                    }
                }
            }
        }
    ],
    "outputs": {
        "hostname": {
            "type": "string",
            "value": "[reference('nestedTemplate1').outputs.publicipn.value]"
        },
        "ipaddress": {
            "type": "string",
            "value": "[reference('nestedTemplate1').outputs.publicipa.value]"
        }
    }
}</pre>
<p> </p>
<div class="saboxplugin-wrap" itemtype="http://schema.org/Person" itemscope itemprop="author"><div class="saboxplugin-tab"><div class="saboxplugin-gravatar"><img decoding="async" src="https://www.e-apostolidis.gr/wp-content/uploads/2019/05/mvpsummit2019.jpg" width="100"  height="100" alt="Pantelis Apostolidis" itemprop="image"></div><div class="saboxplugin-authorname"><a href="https://www.cloudcorner.gr/author/admin/" class="vcard author" rel="author"><span class="fn">Pantelis Apostolidis</span></a></div><div class="saboxplugin-desc"><div itemprop="description"><p>Pantelis Apostolidis is a Sr. Specialist, Azure at Microsoft and a former Microsoft Azure MVP. For the last 20 years, Pantelis has been involved to major cloud projects in Greece and abroad, helping companies to adopt and deploy cloud technologies, driving business value. He is entitled to a lot of Microsoft Expert Certifications, demonstrating his proven experience in delivering high quality solutions. He is an author, blogger and he is acting as a spokesperson for conferences, workshops and webinars. He is also an active member of several communities as a moderator in azureheads.gr and autoexec.gr. Follow him on Twitter @papostolidis.</p>
</div></div><div class="saboxplugin-web "><a href="https://www.cloudcorner.gr" target="_self" >www.cloudcorner.gr</a></div><div class="clearfix"></div><div class="saboxplugin-socials "><a title="Facebook" target="_blank" href="https://www.facebook.com/pantelis.apostolidis" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-facebook" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 264 512"><path fill="currentColor" d="M76.7 512V283H0v-91h76.7v-71.7C76.7 42.4 124.3 0 193.8 0c33.3 0 61.9 2.5 70.2 3.6V85h-48.2c-37.8 0-45.1 18-45.1 44.3V192H256l-11.7 91h-73.6v229"></path></svg></span></a><a title="Linkedin" target="_blank" href="https://www.linkedin.com/in/papostolidis/" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-linkedin" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M100.3 480H7.4V180.9h92.9V480zM53.8 140.1C24.1 140.1 0 115.5 0 85.8 0 56.1 24.1 32 53.8 32c29.7 0 53.8 24.1 53.8 53.8 0 29.7-24.1 54.3-53.8 54.3zM448 480h-92.7V334.4c0-34.7-.7-79.2-48.3-79.2-48.3 0-55.7 37.7-55.7 76.7V480h-92.8V180.9h89.1v40.8h1.3c12.4-23.5 42.7-48.3 87.9-48.3 94 0 111.3 61.9 111.3 142.3V480z"></path></svg></span></a><a title="Instagram" target="_blank" href="https://www.instagram.com/proximagr" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-instagram" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"></path></svg></span></a><a title="Rss" target="_blank" href="https://wwwcloudcorner.gr/feed/rdf/" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-rss" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M128.081 415.959c0 35.369-28.672 64.041-64.041 64.041S0 451.328 0 415.959s28.672-64.041 64.041-64.041 64.04 28.673 64.04 64.041zm175.66 47.25c-8.354-154.6-132.185-278.587-286.95-286.95C7.656 175.765 0 183.105 0 192.253v48.069c0 8.415 6.49 15.472 14.887 16.018 111.832 7.284 201.473 96.702 208.772 208.772.547 8.397 7.604 14.887 16.018 14.887h48.069c9.149.001 16.489-7.655 15.995-16.79zm144.249.288C439.596 229.677 251.465 40.445 16.503 32.01 7.473 31.686 0 38.981 0 48.016v48.068c0 8.625 6.835 15.645 15.453 15.999 191.179 7.839 344.627 161.316 352.465 352.465.353 8.618 7.373 15.453 15.999 15.453h48.068c9.034-.001 16.329-7.474 16.005-16.504z"></path></svg></span></a><a title="Twitter" target="_blank" href="https://twitter.com/papostolidis" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-twitter" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30"><path d="M26.37,26l-8.795-12.822l0.015,0.012L25.52,4h-2.65l-6.46,7.48L11.28,4H4.33l8.211,11.971L12.54,15.97L3.88,26h2.65 l7.182-8.322L19.42,26H26.37z M10.23,6l12.34,18h-2.1L8.12,6H10.23z" /></svg></span></a><a title="Github" target="_blank" href="https://github.com/proximagr" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-github" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path fill="currentColor" d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path></svg></span></a><a title="User email" target="_self" href="mailto:&#112;roxi&#109;&#097;&#103;&#114;&#064;h&#111;t&#109;ail.c&#111;&#109;" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-user_email" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"></path></svg></span></a></div></div></div><p><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.cloudcorner.gr%2Fmicrosoft%2Fazure%2Fdeploy-vm-from-azure-sig-in-new-resource-group%2F&amp;linkname=Deploy%20VM%20from%20Azure%20SIG%20in%20new%20Resource%20Group" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_print" href="https://www.addtoany.com/add_to/print?linkurl=https%3A%2F%2Fwww.cloudcorner.gr%2Fmicrosoft%2Fazure%2Fdeploy-vm-from-azure-sig-in-new-resource-group%2F&amp;linkname=Deploy%20VM%20from%20Azure%20SIG%20in%20new%20Resource%20Group" title="Print" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.cloudcorner.gr%2Fmicrosoft%2Fazure%2Fdeploy-vm-from-azure-sig-in-new-resource-group%2F&#038;title=Deploy%20VM%20from%20Azure%20SIG%20in%20new%20Resource%20Group" data-a2a-url="https://www.cloudcorner.gr/microsoft/azure/deploy-vm-from-azure-sig-in-new-resource-group/" data-a2a-title="Deploy VM from Azure SIG in new Resource Group"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://www.cloudcorner.gr/microsoft/azure/deploy-vm-from-azure-sig-in-new-resource-group/">Deploy VM from Azure SIG in new Resource Group</a> appeared first on <a href="https://www.cloudcorner.gr">Apostolidis Cloud Corner</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.cloudcorner.gr/microsoft/azure/deploy-vm-from-azure-sig-in-new-resource-group/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Azure Failover Cluster with Shared Disk &#8211; Step by Step</title>
		<link>https://www.cloudcorner.gr/microsoft/azure/azure-failover-cluster-with-shared-disk-step-by-step/</link>
					<comments>https://www.cloudcorner.gr/microsoft/azure/azure-failover-cluster-with-shared-disk-step-by-step/#comments</comments>
		
		<dc:creator><![CDATA[Pantelis Apostolidis]]></dc:creator>
		<pubDate>Sat, 04 Apr 2020 13:02:03 +0000</pubDate>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[azure vm]]></category>
		<category><![CDATA[azurerm]]></category>
		<category><![CDATA[cluster]]></category>
		<category><![CDATA[disk]]></category>
		<category><![CDATA[failover cluster]]></category>
		<category><![CDATA[fci]]></category>
		<category><![CDATA[iaas]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[shared disk]]></category>
		<category><![CDATA[storage account]]></category>
		<guid isPermaLink="false">https://www.e-apostolidis.gr/?p=3350</guid>

					<description><![CDATA[<p>Azure Failover Cluster with Shared Disk Recently MIcrosoft Azure anounched the preview feature &#8220;Shared Disk&#8221;. The Shared Disk can be</p>
<p>The post <a href="https://www.cloudcorner.gr/microsoft/azure/azure-failover-cluster-with-shared-disk-step-by-step/">Azure Failover Cluster with Shared Disk &#8211; Step by Step</a> appeared first on <a href="https://www.cloudcorner.gr">Apostolidis Cloud Corner</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h1 style="text-align: justify;">Azure Failover Cluster with Shared Disk</h1>
<p style="text-align: justify;">Recently MIcrosoft Azure anounched the preview feature &#8220;Shared Disk&#8221;. The Shared Disk can be attached at two Azure MVs at the same time. The purpose is to create SQL Server Failover Cluster Instances (FCI), Scale-out File Server (SoFS), File Server for General Use (IW workload), Remote Desktop Server User Profile Disk (RDS UPD) and  SAP ASCS/SCS. More or less we can have a failover cluster at Azure VMs like haveing an on-premises failover cluster with shared storage.</p>
<p style="text-align: justify;">At this post I will demostrate step-by-step how to create a Failover Cluster in Azure with two Azure VMs and a Shared Disk.</p>
<p style="text-align: justify;">Since this is a preview feature at the time I am wroting this post, we need to <a href="https://aka.ms/AzureSharedDiskPreviewSignUp" data-linktype="external">sign up for our preview</a>.</p>
<p style="text-align: justify;">Once we have the confiration that the Shared Disk preview is enabled at our Subscription, we can proceed and create our Shared Disk. Currently this can be done only by using an ARM Template, in order to define the <strong>&#8220;maxShares&#8221;: &#8220;[parameters(&#8216;maxShares&#8217;)]&#8221;</strong> disk property. This property defines in how VMs can this Disk be attached.</p>
<div class="table-scroll-wrapper" style="text-align: justify;">
<table class="table">
<caption class="visually-hidden">The following table illustrates the allowed maximum values for <code>maxShares</code> by disk size:</caption>
<thead>
<tr>
<th>Disk sizes</th>
<th>maxShares limit</th>
</tr>
</thead>
<tbody>
<tr>
<td>P15, P20</td>
<td>2</td>
</tr>
<tr>
<td>P30, P40, P50</td>
<td>5</td>
</tr>
<tr>
<td>P60, P70, P80</td>
<td>10</td>
</tr>
</tbody>
</table>
</div>
<p style="text-align: justify;">Other limitations of the preview are:</p>
<ul style="text-align: justify;">
<li>Currently only available with premium SSDs.</li>
<li>Currently only supported in the West Central US region.</li>
<li>All virtual machines sharing a disk must be deployed in the same proximity placement groups.</li>
<li>Can only be enabled on data disks, not OS disks.</li>
<li>Only basic disks can be used with some versions of Windows Server Failover Cluster, for details see</li>
<li>Failover clustering hardware requirements and storage options.</li>
<li>ReadOnly host caching is not available for premium SSDs with maxShares&gt;1.</li>
<li>Availability sets and virtual machine scale sets can only be used with FaultDomainCount set to 1.</li>
<li>Azure Backup and Azure Site Recovery support is not yet available.</li>
</ul>
<p style="text-align: justify;">From the Azure Portal search and open the &#8220;Template Deployment&#8221;</p>
<p id="fbLGCcl" style="text-align: justify;"><img fetchpriority="high" decoding="async" width="770" height="197" class="alignnone size-full wp-image-3351 " src="https://www.e-apostolidis.gr/wp-content/uploads/2020/04/img_5e8764dede2d3.png" alt="" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e8764dede2d3.png 770w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e8764dede2d3-300x77.png 300w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e8764dede2d3-768x196.png 768w" sizes="(max-width: 770px) 100vw, 770px" />\</p>
<p style="text-align: justify;">Select the &#8220;Build your own template in the editor&#8221;</p>
<p id="EiSACdM" style="text-align: justify;"><img decoding="async" width="450" height="189" class="alignnone size-full wp-image-3352 " src="https://www.e-apostolidis.gr/wp-content/uploads/2020/04/img_5e8764f3f16c2.png" alt="" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e8764f3f16c2.png 450w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e8764f3f16c2-300x126.png 300w" sizes="(max-width: 450px) 100vw, 450px" /></p>
<p style="text-align: justify;">And paste the Shared Disk Json at the template</p>
<p id="WlirTrl" style="text-align: justify;"><img loading="lazy" decoding="async" width="1069" height="852" class="alignnone size-full wp-image-3353 " src="https://www.e-apostolidis.gr/wp-content/uploads/2020/04/img_5e87652a6a1b4.png" alt="" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e87652a6a1b4.png 1069w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e87652a6a1b4-300x239.png 300w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e87652a6a1b4-1024x816.png 1024w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e87652a6a1b4-768x612.png 768w" sizes="auto, (max-width: 1069px) 100vw, 1069px" /></p>
<p style="text-align: justify;">The Shared Disk Json:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">{ 
  "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "dataDiskName": {
      "type": "string",
      "defaultValue": "mySharedDisk"
    },
    "dataDiskSizeGB": {
      "type": "int",
      "defaultValue": 1024
    },
    "maxShares": {
      "type": "int",
      "defaultValue": 2
    }
  },
  "resources": [
    {
      "type": "Microsoft.Compute/disks",
      "name": "[parameters('dataDiskName')]",
      "location": "[resourceGroup().location]",
      "apiVersion": "2019-07-01",
      "sku": {
        "name": "Premium_LRS"
      },
      "properties": {
        "creationData": {
          "createOption": "Empty"
        },
        "diskSizeGB": "[parameters('dataDiskSizeGB')]",
        "maxShares": "[parameters('maxShares')]"
      }
    }
  ] 
}</pre>
<p style="text-align: justify;">After the Template Deployment is comleted you will see a normal disk at the Resoruce Group.</p>
<p id="gJFsVXu" style="text-align: justify;"><img loading="lazy" decoding="async" width="591" height="164" class="alignnone size-full wp-image-3355 " src="https://www.e-apostolidis.gr/wp-content/uploads/2020/04/img_5e8765ef6d351.png" alt="" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e8765ef6d351.png 591w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e8765ef6d351-300x83.png 300w" sizes="auto, (max-width: 591px) 100vw, 591px" /></p>
<h2 style="text-align: justify;">Create the VMs</h2>
<p style="text-align: justify;">Create both VMs like any normal Azure VM creation. I created wto Windows Server 2016 VMs. Both VMs must be added to the same availability set (Fault Domain = 1), in order to add them behing an internal load balancer and they must be added to the same Proximity Placement Group.</p>
<p style="text-align: justify;">To create a Proximity Placement Group, just create a new resource, search for &#8220;Proximity Placement Group&#8221; and press create. Just provide a name for the PPG and the location, that must be the same as the Disk.</p>
<p id="uxOAIrG" style="text-align: justify;"><img loading="lazy" decoding="async" width="597" height="232" class="alignnone size-full wp-image-3386 " src="https://www.e-apostolidis.gr/wp-content/uploads/2020/04/img_5e887579899e4.png" alt="" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e887579899e4.png 597w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e887579899e4-300x117.png 300w" sizes="auto, (max-width: 597px) 100vw, 597px" /></p>
<p style="text-align: justify;">And select it at the VM creation wizard:</p>
<p id="JXiaEkS" style="text-align: justify;"><img loading="lazy" decoding="async" width="784" height="142" class="alignnone size-full wp-image-3358 " src="https://www.e-apostolidis.gr/wp-content/uploads/2020/04/img_5e87b8936977b.png" alt="" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e87b8936977b.png 784w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e87b8936977b-300x54.png 300w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e87b8936977b-768x139.png 768w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e87b8936977b-780x142.png 780w" sizes="auto, (max-width: 784px) 100vw, 784px" /></p>
<p style="text-align: justify;">Attach the Sahred Disk to Both VMs</p>
<p id="CGuUoUH" style="text-align: justify;"><img loading="lazy" decoding="async" width="792" height="200" class="alignnone size-full wp-image-3359 " src="https://www.e-apostolidis.gr/wp-content/uploads/2020/04/img_5e87b8a736614.png" alt="" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e87b8a736614.png 792w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e87b8a736614-300x76.png 300w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e87b8a736614-768x194.png 768w" sizes="auto, (max-width: 792px) 100vw, 792px" /></p>
<p style="text-align: justify;">When attaching the Shared Disk to the VMs you will see the &#8220;disk shares used&#8221; This reports in how many VMs this disk is attached.</p>
<p id="hFlXHtH" style="text-align: justify;"><img loading="lazy" decoding="async" width="775" height="462" class="alignnone size-full wp-image-3360 " src="https://www.e-apostolidis.gr/wp-content/uploads/2020/04/img_5e87bb47c48ce.png" alt="" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e87bb47c48ce.png 775w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e87bb47c48ce-300x179.png 300w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e87bb47c48ce-768x458.png 768w" sizes="auto, (max-width: 775px) 100vw, 775px" /></p>
<p style="text-align: justify;">Once the VMs are ready we can start the Failover Cluster process. We need to add both VMs to the Domain. Then go tot he Disk Management and bring the disks online, GTP on both servers. The next step is to enable the Failover Clustering feature on both VMs. This can be easily acomplished using the below command:</p>
<p style="text-align: justify;">Install-WindowsFeature -Name Failover-Clustering –IncludeManagementTools –ComputerName SDVM01<br />
Install-WindowsFeature -Name Failover-Clustering –IncludeManagementTools –ComputerName SDVM02</p>
<p style="text-align: justify;">Restart both VMs</p>
<p style="text-align: justify;">Lets start the Failover Cluster Wizard. Select both Azure VMs and validate with running all tests.</p>
<p id="fSXkzSq" style="text-align: justify;"><img loading="lazy" decoding="async" width="669" height="152" class="alignnone size-full wp-image-3362 " src="https://www.e-apostolidis.gr/wp-content/uploads/2020/04/img_5e884c32866ec.png" alt="" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e884c32866ec.png 669w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e884c32866ec-300x68.png 300w" sizes="auto, (max-width: 669px) 100vw, 669px" /></p>
<p id="WhPnAgZ" style="text-align: justify;"><img loading="lazy" decoding="async" width="547" height="112" class="alignnone size-full wp-image-3363 " src="https://www.e-apostolidis.gr/wp-content/uploads/2020/04/img_5e884c4f95eff.png" alt="" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e884c4f95eff.png 547w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e884c4f95eff-300x61.png 300w" sizes="auto, (max-width: 547px) 100vw, 547px" /></p>
<p style="text-align: justify;">The report should have sucess to all Storage Related Stuff. Only the Cluster IP will fail, since it cannot allocate an Azure IP.</p>
<p id="SMrPWah" style="text-align: justify;"><img loading="lazy" decoding="async" width="864" height="557" class="alignnone size-full wp-image-3364 " src="https://www.e-apostolidis.gr/wp-content/uploads/2020/04/img_5e884dec86cc7.png" alt="" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e884dec86cc7.png 864w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e884dec86cc7-300x193.png 300w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e884dec86cc7-768x495.png 768w" sizes="auto, (max-width: 864px) 100vw, 864px" /></p>
<p id="kbDhzfM" style="text-align: justify;">So we will not create the Cluster uning the GUI wizard. We will create the cluster unsing the new-cluster command to spesify the cluter IP. But first lets create the Cluster IP Load Balancer.</p>
<p style="text-align: justify;">To enable the Cluster IP we need to create an Internal <strong>StandardLoad</strong> Balancer with Static IP. Add both VMs to the Backend pool of the load balancer.</p>
<p id="vvzgaRU" style="text-align: justify;"><img loading="lazy" decoding="async" width="1262" height="154" class="alignnone size-full wp-image-3388 " src="https://www.e-apostolidis.gr/wp-content/uploads/2020/04/img_5e887c9ea3982.png" alt="" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e887c9ea3982.png 1262w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e887c9ea3982-300x37.png 300w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e887c9ea3982-1024x125.png 1024w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e887c9ea3982-768x94.png 768w" sizes="auto, (max-width: 1262px) 100vw, 1262px" /></p>
<p style="text-align: justify;">And Run this command to one of the two VMs:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">New-Cluster -Name cluster1 -Node SDVM01,SDVM02  -StaticAddress 192.168.0.10</pre>
<p style="text-align: justify;">The cluster is ready and we can now we can add the Disk to the Cluster</p>
<p id="ERZwxVD" style="text-align: justify;"><img loading="lazy" decoding="async" width="499" height="204" class="alignnone size-full wp-image-3373 " src="https://www.e-apostolidis.gr/wp-content/uploads/2020/04/img_5e885cc7db4ef.png" alt="" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e885cc7db4ef.png 499w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e885cc7db4ef-300x123.png 300w" sizes="auto, (max-width: 499px) 100vw, 499px" /></p>
<p style="text-align: justify;">righ click at the Cluster Disk 1 and select &#8220;Add to cluster shared volumes&#8221;</p>
<p id="ZdNipPt" style="text-align: justify;"><img loading="lazy" decoding="async" width="553" height="163" class="alignnone size-full wp-image-3371 " src="https://www.e-apostolidis.gr/wp-content/uploads/2020/04/img_5e885af30db17.png" alt="" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e885af30db17.png 553w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e885af30db17-300x88.png 300w" sizes="auto, (max-width: 553px) 100vw, 553px" /></p>
<p style="text-align: justify;">Wait untill the disk is online</p>
<p id="QNgGhJy" style="text-align: justify;"><img loading="lazy" decoding="async" width="564" height="119" class="alignnone size-full wp-image-3374 " src="https://www.e-apostolidis.gr/wp-content/uploads/2020/04/img_5e885cf948fa1.png" alt="" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e885cf948fa1.png 564w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e885cf948fa1-300x63.png 300w" sizes="auto, (max-width: 564px) 100vw, 564px" />&#8216;</p>
<p style="text-align: justify;">and check the C:\ClusterStorage path for the &#8220;Volume1&#8221; link.</p>
<p id="NQPOVug" style="text-align: justify;"><img loading="lazy" decoding="async" width="365" height="129" class="alignnone size-full wp-image-3390 " src="https://www.e-apostolidis.gr/wp-content/uploads/2020/04/img_5e88800cadbdf.png" alt="" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e88800cadbdf.png 365w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e88800cadbdf-300x106.png 300w" sizes="auto, (max-width: 365px) 100vw, 365px" /></p>
<p style="text-align: justify;">open the Volume1 and create a file, just to cehck that it is working</p>
<p id="xUUryCo" style="text-align: justify;"><img loading="lazy" decoding="async" width="463" height="126" class="alignnone size-full wp-image-3376 " src="https://www.e-apostolidis.gr/wp-content/uploads/2020/04/img_5e885d3374d9b.png" alt="" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e885d3374d9b.png 463w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e885d3374d9b-300x82.png 300w" sizes="auto, (max-width: 463px) 100vw, 463px" /></p>
<p style="text-align: justify;">To have a more stable cluster, add a Quorum. At the cluster name, right click and select More Actions / Configure Quorum settings.</p>
<p id="YDVtouJ" style="text-align: justify;"><img loading="lazy" decoding="async" width="499" height="103" class="alignnone size-full wp-image-3377 " src="https://www.e-apostolidis.gr/wp-content/uploads/2020/04/img_5e886a521ce3a.png" alt="" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e886a521ce3a.png 499w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e886a521ce3a-300x62.png 300w" sizes="auto, (max-width: 499px) 100vw, 499px" /></p>
<p style="text-align: justify;">Since we are on Azure we will configure an Azure Storage account for quorum. Select the &#8220;Advanced Configuration&#8221;</p>
<p id="rBZxQik" style="text-align: justify;"><img loading="lazy" decoding="async" width="636" height="225" class="alignnone size-full wp-image-3378 " src="https://www.e-apostolidis.gr/wp-content/uploads/2020/04/img_5e886a703ea41.png" alt="" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e886a703ea41.png 636w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e886a703ea41-300x106.png 300w" sizes="auto, (max-width: 636px) 100vw, 636px" /></p>
<p style="text-align: justify;">and select the &#8220;Configure CLoud Witness&#8221;.</p>
<p id="CzrXsZi" style="text-align: justify;"><img loading="lazy" decoding="async" width="436" height="139" class="alignnone size-full wp-image-3379 " src="https://www.e-apostolidis.gr/wp-content/uploads/2020/04/img_5e886a7e6e9b5.png" alt="" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e886a7e6e9b5.png 436w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e886a7e6e9b5-300x96.png 300w" sizes="auto, (max-width: 436px) 100vw, 436px" /></p>
<p style="text-align: justify;">Create an Azure Storage Account</p>
<p id="Fjcmskw" style="text-align: justify;"><img loading="lazy" decoding="async" width="744" height="241" class="alignnone size-full wp-image-3380 " src="https://www.e-apostolidis.gr/wp-content/uploads/2020/04/img_5e886ab60d894.png" alt="" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e886ab60d894.png 744w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e886ab60d894-300x97.png 300w" sizes="auto, (max-width: 744px) 100vw, 744px" /></p>
<p style="text-align: justify;">add the Storage Account to the Virtual Network of the VMs, to secure it</p>
<p id="MYjDUaw" style="text-align: justify;"><img loading="lazy" decoding="async" width="776" height="331" class="alignnone size-full wp-image-3381 " src="https://www.e-apostolidis.gr/wp-content/uploads/2020/04/img_5e886ac84f241.png" alt="" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e886ac84f241.png 776w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e886ac84f241-300x128.png 300w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e886ac84f241-768x328.png 768w" sizes="auto, (max-width: 776px) 100vw, 776px" /></p>
<p style="text-align: justify;">And once the Storage Account is ready, copy/paste the name and the Key to the Culster Quorum wizard.</p>
<p id="vtoanTs" style="text-align: justify;"><img loading="lazy" decoding="async" width="275" height="195" class="alignnone size-full wp-image-3383 " src="https://www.e-apostolidis.gr/wp-content/uploads/2020/04/img_5e886b5ab3d31.png" alt="" /></p>
<p style="text-align: justify;">Now we have a full failover cluster</p>
<p id="YZSSBdA" style="text-align: justify;"><img loading="lazy" decoding="async" width="533" height="222" class="alignnone size-full wp-image-3391 " src="https://www.e-apostolidis.gr/wp-content/uploads/2020/04/img_5e88824015add.png" alt="" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e88824015add.png 533w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e88824015add-300x125.png 300w" sizes="auto, (max-width: 533px) 100vw, 533px" /></p>
<p style="text-align: justify;">Server 1:</p>
<p id="pUiZhrr" style="text-align: justify;"><img loading="lazy" decoding="async" width="510" height="276" class="alignnone size-full wp-image-3393 " src="https://www.e-apostolidis.gr/wp-content/uploads/2020/04/img_5e8882977a7f3.png" alt="" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e8882977a7f3.png 510w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e8882977a7f3-300x162.png 300w" sizes="auto, (max-width: 510px) 100vw, 510px" /></p>
<p style="text-align: justify;">Server 2:</p>
<p id="tRHOehs" style="text-align: justify;"><img loading="lazy" decoding="async" width="527" height="295" class="alignnone size-full wp-image-3392 " src="https://www.e-apostolidis.gr/wp-content/uploads/2020/04/img_5e88827ab8584.png" alt="" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e88827ab8584.png 527w, https://www.cloudcorner.gr/wp-content/uploads/2020/04/img_5e88827ab8584-300x168.png 300w" sizes="auto, (max-width: 527px) 100vw, 527px" /></p>
<p>Now we can deploy SQL Server FCI, File Server, etc.. !!!!</p>
<p style="text-align: justify;">More info abuot the Shared Disk: <a href="https://docs.microsoft.com/en-us/azure/virtual-machines/windows/disks-shared-enable">https://docs.microsoft.com/en-us/azure/virtual-machines/windows/disks-shared-enable</a></p>
<div class="saboxplugin-wrap" itemtype="http://schema.org/Person" itemscope itemprop="author">
<div class="saboxplugin-tab">
<div class="saboxplugin-gravatar"><img loading="lazy" decoding="async" src="https://www.e-apostolidis.gr/wp-content/uploads/2019/05/mvpsummit2019.jpg" width="100"  height="100" alt="Pantelis Apostolidis" itemprop="image"></div>
<div class="saboxplugin-authorname"><a href="https://www.cloudcorner.gr/author/admin/" class="vcard author" rel="author"><span class="fn">Pantelis Apostolidis</span></a></div>
<div class="saboxplugin-desc">
<div itemprop="description">
<p>Pantelis Apostolidis is a Sr. Specialist, Azure at Microsoft and a former Microsoft Azure MVP. For the last 20 years, Pantelis has been involved to major cloud projects in Greece and abroad, helping companies to adopt and deploy cloud technologies, driving business value. He is entitled to a lot of Microsoft Expert Certifications, demonstrating his proven experience in delivering high quality solutions. He is an author, blogger and he is acting as a spokesperson for conferences, workshops and webinars. He is also an active member of several communities as a moderator in azureheads.gr and autoexec.gr. Follow him on Twitter @papostolidis.</p>
</div>
</div>
<div class="saboxplugin-web "><a href="https://www.cloudcorner.gr" target="_self" >www.cloudcorner.gr</a></div>
<div class="clearfix"></div>
<div class="saboxplugin-socials "><a title="Facebook" target="_blank" href="https://www.facebook.com/pantelis.apostolidis" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-facebook" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 264 512"><path fill="currentColor" d="M76.7 512V283H0v-91h76.7v-71.7C76.7 42.4 124.3 0 193.8 0c33.3 0 61.9 2.5 70.2 3.6V85h-48.2c-37.8 0-45.1 18-45.1 44.3V192H256l-11.7 91h-73.6v229"></path></svg></span></a><a title="Linkedin" target="_blank" href="https://www.linkedin.com/in/papostolidis/" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-linkedin" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M100.3 480H7.4V180.9h92.9V480zM53.8 140.1C24.1 140.1 0 115.5 0 85.8 0 56.1 24.1 32 53.8 32c29.7 0 53.8 24.1 53.8 53.8 0 29.7-24.1 54.3-53.8 54.3zM448 480h-92.7V334.4c0-34.7-.7-79.2-48.3-79.2-48.3 0-55.7 37.7-55.7 76.7V480h-92.8V180.9h89.1v40.8h1.3c12.4-23.5 42.7-48.3 87.9-48.3 94 0 111.3 61.9 111.3 142.3V480z"></path></svg></span></a><a title="Instagram" target="_blank" href="https://www.instagram.com/proximagr" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-instagram" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"></path></svg></span></a><a title="Rss" target="_blank" href="https://wwwcloudcorner.gr/feed/rdf/" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-rss" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M128.081 415.959c0 35.369-28.672 64.041-64.041 64.041S0 451.328 0 415.959s28.672-64.041 64.041-64.041 64.04 28.673 64.04 64.041zm175.66 47.25c-8.354-154.6-132.185-278.587-286.95-286.95C7.656 175.765 0 183.105 0 192.253v48.069c0 8.415 6.49 15.472 14.887 16.018 111.832 7.284 201.473 96.702 208.772 208.772.547 8.397 7.604 14.887 16.018 14.887h48.069c9.149.001 16.489-7.655 15.995-16.79zm144.249.288C439.596 229.677 251.465 40.445 16.503 32.01 7.473 31.686 0 38.981 0 48.016v48.068c0 8.625 6.835 15.645 15.453 15.999 191.179 7.839 344.627 161.316 352.465 352.465.353 8.618 7.373 15.453 15.999 15.453h48.068c9.034-.001 16.329-7.474 16.005-16.504z"></path></svg></span></a><a title="Twitter" target="_blank" href="https://twitter.com/papostolidis" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-twitter" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30"><path d="M26.37,26l-8.795-12.822l0.015,0.012L25.52,4h-2.65l-6.46,7.48L11.28,4H4.33l8.211,11.971L12.54,15.97L3.88,26h2.65 l7.182-8.322L19.42,26H26.37z M10.23,6l12.34,18h-2.1L8.12,6H10.23z" /></svg></span></a><a title="Github" target="_blank" href="https://github.com/proximagr" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-github" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path fill="currentColor" d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path></svg></span></a><a title="User email" target="_self" href="mailto:p&#114;oxi&#109;agr&#064;&#104;ot&#109;&#097;&#105;&#108;&#046;c&#111;m" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-user_email" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"></path></svg></span></a></div>
</div>
</div>
<p><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.cloudcorner.gr%2Fmicrosoft%2Fazure%2Fazure-failover-cluster-with-shared-disk-step-by-step%2F&amp;linkname=Azure%20Failover%20Cluster%20with%20Shared%20Disk%20%E2%80%93%20Step%20by%20Step" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_print" href="https://www.addtoany.com/add_to/print?linkurl=https%3A%2F%2Fwww.cloudcorner.gr%2Fmicrosoft%2Fazure%2Fazure-failover-cluster-with-shared-disk-step-by-step%2F&amp;linkname=Azure%20Failover%20Cluster%20with%20Shared%20Disk%20%E2%80%93%20Step%20by%20Step" title="Print" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.cloudcorner.gr%2Fmicrosoft%2Fazure%2Fazure-failover-cluster-with-shared-disk-step-by-step%2F&#038;title=Azure%20Failover%20Cluster%20with%20Shared%20Disk%20%E2%80%93%20Step%20by%20Step" data-a2a-url="https://www.cloudcorner.gr/microsoft/azure/azure-failover-cluster-with-shared-disk-step-by-step/" data-a2a-title="Azure Failover Cluster with Shared Disk – Step by Step"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://www.cloudcorner.gr/microsoft/azure/azure-failover-cluster-with-shared-disk-step-by-step/">Azure Failover Cluster with Shared Disk &#8211; Step by Step</a> appeared first on <a href="https://www.cloudcorner.gr">Apostolidis Cloud Corner</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.cloudcorner.gr/microsoft/azure/azure-failover-cluster-with-shared-disk-step-by-step/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
		<item>
		<title>Infrastructure as Code &#124; Deploy a VNET &#038; NSG &#038; UDR</title>
		<link>https://www.cloudcorner.gr/microsoft/azure/infrastructure-as-code-deploy-a-vnet-nsg-udr/</link>
					<comments>https://www.cloudcorner.gr/microsoft/azure/infrastructure-as-code-deploy-a-vnet-nsg-udr/#comments</comments>
		
		<dc:creator><![CDATA[Pantelis Apostolidis]]></dc:creator>
		<pubDate>Wed, 11 Mar 2020 22:45:35 +0000</pubDate>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[IaC]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[azure template]]></category>
		<category><![CDATA[azurerm]]></category>
		<category><![CDATA[devops]]></category>
		<category><![CDATA[iac]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[network security group]]></category>
		<category><![CDATA[nsg]]></category>
		<category><![CDATA[route table]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[udr]]></category>
		<category><![CDATA[virtual network]]></category>
		<category><![CDATA[vnet]]></category>
		<guid isPermaLink="false">https://www.e-apostolidis.gr/?p=3297</guid>

					<description><![CDATA[<p>Infrastructure as Code &#124; Deploy a VNET with NSG and UDRs Infrastructure as Code, or just IaC, provides three three</p>
<p>The post <a href="https://www.cloudcorner.gr/microsoft/azure/infrastructure-as-code-deploy-a-vnet-nsg-udr/">Infrastructure as Code | Deploy a VNET &#038; NSG &#038; UDR</a> appeared first on <a href="https://www.cloudcorner.gr">Apostolidis Cloud Corner</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Infrastructure as Code | Deploy a VNET with NSG and UDRs</h2>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3312" src="https://www.e-apostolidis.gr/wp-content/uploads/2020/03/IaC.png" alt="IaC" width="1095" height="838" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/03/IaC.png 1095w, https://www.cloudcorner.gr/wp-content/uploads/2020/03/IaC-300x230.png 300w, https://www.cloudcorner.gr/wp-content/uploads/2020/03/IaC-1024x784.png 1024w, https://www.cloudcorner.gr/wp-content/uploads/2020/03/IaC-768x588.png 768w" sizes="auto, (max-width: 1095px) 100vw, 1095px" /></p>
<p>Infrastructure as Code, or just IaC, provides three three main advantages: cost reduction, faster execution and risk reduction, the attributes of the DevOps culture.</p>
<p style="text-align: justify;">Microsoft Azure Resource Manager allows the managing and provisioning of Azure Resources, that can be Virtual Machines, Virtual Networks, Storage Accounts, Apps, SQL Databases and everything that a computer data center includes, through machine-readable definition files, known as JSON templates, without the need of physical hardware configuration or interactive configuration tools.</p>
<p style="text-align: justify;">I am starting a series of posts about building infrastructure with JSON templates.</p>
<p style="text-align: justify;">The tool I use to build my Azure Json templates is the Visual Studio Code. You can download it from <a href="https://code.visualstudio.com/">https://code.visualstudio.com/</a> for every platform.</p>
<p style="text-align: justify;">To work with Azure Resource Manager you need the Azure Resource Manager Tools extension. Open the VS Code, go to the Extensions Section, search and install the Azure Resource Manager Tools extension.</p>
<p id="SEhVTIV"><img loading="lazy" decoding="async" class="alignnone wp-image-3306 size-full" src="https://www.e-apostolidis.gr/wp-content/uploads/2020/03/img_5e695dd565ae7.png" alt="infrastructure as code" width="488" height="353" srcset="https://www.cloudcorner.gr/wp-content/uploads/2020/03/img_5e695dd565ae7.png 488w, https://www.cloudcorner.gr/wp-content/uploads/2020/03/img_5e695dd565ae7-300x217.png 300w" sizes="auto, (max-width: 488px) 100vw, 488px" /></p>
<p>The extension is very helpful since it highlights the code, it provides references and intellisense.</p>
<p>At this post I am sharing &amp; explaining my Azure json template for deploying a Virtual Network, a Network Security Group and a Route Table.</p>
<p>You can find and download my working template at <a href="https://github.com/proximagr" target="_blank" rel="noopener noreferrer">my Git account</a> :</p>
<p><a href="https://github.com/proximagr/ARMTemplates/tree/master/VNET-2sub-NSG-UDR" target="_blank" rel="noopener noreferrer">https://github.com/proximagr/ARMTemplates/tree/master/VNET-2sub-NSG-UDR</a></p>
<h3>Json Template Guide</h3>
<p>Below you can find my template with comments, for better understanding.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="json" data-enlighter-theme="droide">{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
//** Define the Virtual Network Name */
    "vnetName": {
      "type": "string",
      "defaultValue": "Cloud-Corner-VNET",
      "metadata": {
        "description": "Cloud Corner VNET"
      }
//** Define the Address Space of the Virtual Network */
    },
      "vnetAddressPrefix": {
        "type": "string",
        "defaultValue": "10.0.0.0/24",
        "metadata": {
          "description": "Address prefix"
        }
//** Define the Address Space of the the First Subnet */
      },
      "subnet1Prefix": {
        "type": "string",
        "defaultValue": "10.0.0.0/27",
        "metadata": {
          "description": "Subnet 1 Prefix"
        }
//** Define the Name of the the First Subnet */
      },
      "subnet1Name": {
        "type": "string",
        "defaultValue": "Subnet1",
        "metadata": {
          "description": "Subnet 1 Name"
        }
//** Define the Address Space of the the Second Subnet */
      },
      "subnet2Prefix": {
        "type": "string",
        "defaultValue": "10.0.0.32/27",
        "metadata": {
          "description": "Subnet 2 Prefix"
        }
//** Define the Name of the the First Subnet */
      },
      "subnet2Name": {
        "type": "string",
        "defaultValue": "Subnet2",
        "metadata": {
          "description": "Subnet 2 Name"
        }
      },
//** Define the Name of the the Network Security Group */
      "networkSecurityGroup01Name": {
        "type": "string",
        "defaultValue": "Cloud-Corner-NSG-01",
        "metadata": {
          "description": "This is the name of the network security group"
        }
      },
//** Define the Name of the the First Route Table */
      "RouteTable01Name": {
        "type": "string",
        "defaultValue": "Cloud-Corner-UDR-01",
        "metadata": {
        "description": "Route Table 01 Name."
        }
      },
//** Define the Name of the the First Route of the First Route Table */
      "Route01Name": {
        "type": "string",
        "defaultValue": "To-internet",
        "metadata": {
          "description": "Route 01 Name."
        }
      },
//** Define the Next Hop Type of the the First Route of the First Route Table */
      "Route01NextHopType": {
        "type": "string",
        "allowedValues": [
        "VirtualNetworkGateway",
        "VnetLocal",
        "Internet",
        "VirtualAppliance",
        "None"
      ],
      "defaultValue": "VirtualAppliance",
        "metadata": {
          "description": "Route 01 Next Hop Type."
        }
      },
//** Define the Address Prefix of the First Route of the First Route Table */
      "Route01AddressPrefix": {
        "type": "string",
        "defaultValue": "0.0.0.0/0",
        "metadata": {
          "description": "Route 01 Address Prefix."
        }
      },
//** If you set "Virtyal Appliance for Next Hop Type, then you need to define the Next Hop IP Address, */
//** meaning the appliance's IP address. Here you define it for the First Route of the First Route Table */
        "RT01Route01NextHopIPAddress": {
        "type": "string",
        "defaultValue": "10.0.0.40",
        "metadata": {
          "description": "Next Hop IP Addess."
        }
      },
//** Define the Name of the Second Route Table */
      "RouteTable02Name": {
        "type": "string",
        "defaultValue": "Cloud-Corner-UDR-02",
        "metadata": {
          "description": "Route Table 02 Name."
        }
      },
//** Define the Name of the the First Route of the Second Route Table */
      "RT02Route01Name": {
        "type": "string",
        "defaultValue": "Local-Subnet",
        "metadata": {
        "description": "Route Table 02 Route 01 Name."
        }
      },
//** Define the Next Hop Type of the the First Route of the Second Route Table */
      "RT02Route01NextHopType": {
        "type": "string",
        "allowedValues": [
        "VirtualNetworkGateway",
        "VnetLocal",
        "Internet",
        "VirtualAppliance",
        "None"
      ],
      "defaultValue": "VnetLocal",
        "metadata": {
          "description": "Route 02 Next Hop Type."
        }
      },
//** Define the Address Prefix of the the First Route of the Second Route Table */
      "RT02Route01AddressPrefix": {
        "type": "string",
        "defaultValue": "10.0.0.0/27",
        "metadata": {
          "description": "Route Table 02 Route 01 Address Prefix."
        }
      },
//** Define the Name of the the Second Route of the Second Route Table */
        "RT02Route02Name": {
          "type": "string",
          "defaultValue": "To-subnet-1",
          "metadata": {
            "description": "Route Table 02 Route 01 Name."
          }
        },
//** Define the Next Hop Type of the the Second Route of the Second Route Table */
        "RT02Route02NextHopType": {
          "type": "string",
          "allowedValues": [
          "VirtualNetworkGateway",
          "VnetLocal",
          "Internet",
          "VirtualAppliance",
          "None"
        ],
        "defaultValue": "VirtualAppliance",
          "metadata": {
            "description": "Route 02 Next Hop Type."
          }
        },
//** Define the address prefix of the the Second Route of the Second Route Table */
        "RT02Route02AddressPrefix": {
          "type": "string",
          "defaultValue": "10.0.0.32/27",
          "metadata": {
            "description": "Route Table 02 Route 01 Address Prefix."
          }
      },
//** Define the next hop IP address (the virtual appliance's address) of the the Second Route of the Second Route Table */
        "RT02Route02NextHopIPAddress": {
          "type": "string",
          "defaultValue": "10.0.0.40",
          "metadata": {
            "description": "Next Hop IP Addess."
          }
        }
    },
//** I dont use any variables, you can exclude this section*/
  "variables": {},
  "resources": [
//* create the First Route Table &amp; Route*/
    {
    "apiVersion": "2017-10-01",
    "type": "Microsoft.Network/routeTables",
    "name": "[parameters('RouteTable01Name')]",
    "location": "[resourceGroup().location]",
    "properties": {
    "disableBgpRoutePropagation": true,
    "routes": [
      {
        "name": "[parameters('Route01Name')]",
        "properties": {
          "addressPrefix": "[parameters('Route01AddressPrefix')]",
          "nextHopType": "[parameters('Route01NextHopType')]",
          "nextHopIpAddress": "[parameters('RT01Route01NextHopIPAddress')]"
          }
        }
      ]
    }
  },
//* create the Second Route Table &amp; Routes*/
    {
    "apiVersion": "2017-10-01",
    "type": "Microsoft.Network/routeTables",
    "name": "[parameters('RouteTable02Name')]",
    "location": "[resourceGroup().location]",
    "properties": {
    "disableBgpRoutePropagation": true,
    "routes": [
      {
        "name": "[parameters('RT02Route01Name')]",
        "properties": {
          "addressPrefix": "[parameters('RT02Route01AddressPrefix')]",
          "nextHopType": "[parameters('RT02Route01NextHopType')]"
        }
      },
          {
        "name": "[parameters('RT02Route02Name')]",
        "properties": {
          "addressPrefix": "[parameters('RT02Route02AddressPrefix')]",
          "nextHopType": "[parameters('RT02Route02NextHopType')]",
          "nextHopIpAddress": "[parameters('RT02Route02NextHopIPAddress')]"
          }
        }
      ]
    }
  },
//* create teh Network Security Group */
    {
    "apiVersion": "2019-02-01",
    "type": "Microsoft.Network/networkSecurityGroups",
    "name": "[parameters('networkSecurityGroup01Name')]",
    "location": "[resourceGroup().location]",
    "properties": {
      "securityRules": [
        {
          "name": "HTTPS",
          "properties": {
            "description": "Open HTTPS to Public",
            "protocol": "Tcp",
            "sourcePortRange": "443",
            "destinationPortRange": "443",
            "sourceAddressPrefix": "*",
            "destinationAddressPrefix": "*",
            "access": "Allow",
            "priority": 101,
            "direction": "Inbound"
            }
          }
        ]
      }
    },
//* create the Virtual Network */
    {
      "apiVersion": "2018-10-01",
      "type": "Microsoft.Network/virtualNetworks",
      "name": "[parameters('vnetName')]",
      "location": "[resourceGroup().location]",
//*add a dependency in order to ensure that the NSG is created before the VNET, in order to be able to attach it*/
      "dependsOn": [
        "[parameters('networkSecurityGroup01Name')]"
      ],
      "properties": {
        "AddressSpace": {
          "AddressPrefixes": [
            "[parameters('vnetAddressPrefix')]"
          ]
        }
      },
      "resources": [
//* create the first subnet */
        {
        "apiVersion": "2018-10-01",
        "type": "subnets",
        "location": "[resourceGroup().location]",
        "name": "[parameters('subnet1Name')]",
//* add dependencies to create the resources with an order, because you need to ensure that the VNET is ready before creating the Subnet and also the Route Table*/
        "dependsOn": [
          "[parameters('vnetName')]",
          "[resourceId('Microsoft.Network/routeTables', parameters('RouteTable01Name'))]"
        ],
        "properties": {
        "AddressPrefix": "[parameters('subnet1Prefix')]",
//*attach the Newtork Securoty Group to the Subnet*/
        "networkSecurityGroup": {
        "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroup01Name'))]"},
//*attacht the First route table to the Subnet*/
        "routeTable": {
        "id": "[resourceId('Microsoft.Network/routeTables', parameters('RouteTable01Name'))]"
          }
         }
        },
//*create the second subnet*/
        {
        "apiVersion": "2018-10-01",
        "type": "subnets",
        "location": "[resourceGroup().location]",
        "name": "[parameters('subnet2Name')]",
        "dependsOn": [
          "[parameters('vnetName')]",
          "[parameters('subnet1Name')]",
          "[parameters('RouteTable02Name')]"
        ],
        "properties": {
          "AddressPrefix": "[parameters('subnet2Prefix')]",
//*attach the Newtork Securoty Group to the Subnet*/
          "networkSecurityGroup": {
          "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroup01Name'))]"},
//*attacht the second route table to the Subnet*/
          "routeTable": {
          "id": "[resourceId('Microsoft.Network/routeTables', parameters('RouteTable02Name'))]"
            }
          }
        }
      ]
    }
  ]
}</pre>
<p>&nbsp;</p>
<h3>Deploy the template</h3>
<p><strong>Deploy the template directly from here:</strong></p>
<p><a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fproximagr%2FARMTemplates%2Fmaster%2FVNET-2sub-NSG-UDR%2Fazuredeploy.json" target="_blank" rel="noopener noreferrer"> <img decoding="async" src="https://aka.ms/deploytoazurebutton" /> </a></p>
<p>&nbsp;</p>
<p>More Azure Resource Manager Templates: <a href="https://www.e-apostolidis.gr/microsoft/create-azure-file-shares-using-arm-template-powershell/">https://www.e-apostolidis.gr/microsoft/azure/create-azure-file-shares-using-arm-template-powershell/</a></p>
<div class="saboxplugin-wrap" itemtype="http://schema.org/Person" itemscope itemprop="author">
<div class="saboxplugin-tab">
<div class="saboxplugin-gravatar"><img loading="lazy" decoding="async" src="https://www.e-apostolidis.gr/wp-content/uploads/2019/05/mvpsummit2019.jpg" width="100"  height="100" alt="Pantelis Apostolidis" itemprop="image"></div>
<div class="saboxplugin-authorname"><a href="https://www.cloudcorner.gr/author/admin/" class="vcard author" rel="author"><span class="fn">Pantelis Apostolidis</span></a></div>
<div class="saboxplugin-desc">
<div itemprop="description">
<p>Pantelis Apostolidis is a Sr. Specialist, Azure at Microsoft and a former Microsoft Azure MVP. For the last 20 years, Pantelis has been involved to major cloud projects in Greece and abroad, helping companies to adopt and deploy cloud technologies, driving business value. He is entitled to a lot of Microsoft Expert Certifications, demonstrating his proven experience in delivering high quality solutions. He is an author, blogger and he is acting as a spokesperson for conferences, workshops and webinars. He is also an active member of several communities as a moderator in azureheads.gr and autoexec.gr. Follow him on Twitter @papostolidis.</p>
</div>
</div>
<div class="saboxplugin-web "><a href="https://www.cloudcorner.gr" target="_self" >www.cloudcorner.gr</a></div>
<div class="clearfix"></div>
<div class="saboxplugin-socials "><a title="Facebook" target="_blank" href="https://www.facebook.com/pantelis.apostolidis" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-facebook" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 264 512"><path fill="currentColor" d="M76.7 512V283H0v-91h76.7v-71.7C76.7 42.4 124.3 0 193.8 0c33.3 0 61.9 2.5 70.2 3.6V85h-48.2c-37.8 0-45.1 18-45.1 44.3V192H256l-11.7 91h-73.6v229"></path></svg></span></a><a title="Linkedin" target="_blank" href="https://www.linkedin.com/in/papostolidis/" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-linkedin" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M100.3 480H7.4V180.9h92.9V480zM53.8 140.1C24.1 140.1 0 115.5 0 85.8 0 56.1 24.1 32 53.8 32c29.7 0 53.8 24.1 53.8 53.8 0 29.7-24.1 54.3-53.8 54.3zM448 480h-92.7V334.4c0-34.7-.7-79.2-48.3-79.2-48.3 0-55.7 37.7-55.7 76.7V480h-92.8V180.9h89.1v40.8h1.3c12.4-23.5 42.7-48.3 87.9-48.3 94 0 111.3 61.9 111.3 142.3V480z"></path></svg></span></a><a title="Instagram" target="_blank" href="https://www.instagram.com/proximagr" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-instagram" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"></path></svg></span></a><a title="Rss" target="_blank" href="https://wwwcloudcorner.gr/feed/rdf/" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-rss" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M128.081 415.959c0 35.369-28.672 64.041-64.041 64.041S0 451.328 0 415.959s28.672-64.041 64.041-64.041 64.04 28.673 64.04 64.041zm175.66 47.25c-8.354-154.6-132.185-278.587-286.95-286.95C7.656 175.765 0 183.105 0 192.253v48.069c0 8.415 6.49 15.472 14.887 16.018 111.832 7.284 201.473 96.702 208.772 208.772.547 8.397 7.604 14.887 16.018 14.887h48.069c9.149.001 16.489-7.655 15.995-16.79zm144.249.288C439.596 229.677 251.465 40.445 16.503 32.01 7.473 31.686 0 38.981 0 48.016v48.068c0 8.625 6.835 15.645 15.453 15.999 191.179 7.839 344.627 161.316 352.465 352.465.353 8.618 7.373 15.453 15.999 15.453h48.068c9.034-.001 16.329-7.474 16.005-16.504z"></path></svg></span></a><a title="Twitter" target="_blank" href="https://twitter.com/papostolidis" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-twitter" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30"><path d="M26.37,26l-8.795-12.822l0.015,0.012L25.52,4h-2.65l-6.46,7.48L11.28,4H4.33l8.211,11.971L12.54,15.97L3.88,26h2.65 l7.182-8.322L19.42,26H26.37z M10.23,6l12.34,18h-2.1L8.12,6H10.23z" /></svg></span></a><a title="Github" target="_blank" href="https://github.com/proximagr" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-github" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path fill="currentColor" d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path></svg></span></a><a title="User email" target="_self" href="mailto:&#112;ro&#120;&#105;&#109;ag&#114;&#064;hot&#109;a&#105;&#108;&#046;com" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-user_email" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"></path></svg></span></a></div>
</div>
</div>
<p><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.cloudcorner.gr%2Fmicrosoft%2Fazure%2Finfrastructure-as-code-deploy-a-vnet-nsg-udr%2F&amp;linkname=Infrastructure%20as%20Code%20%7C%20Deploy%20a%20VNET%20%26%20NSG%20%26%20UDR" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_print" href="https://www.addtoany.com/add_to/print?linkurl=https%3A%2F%2Fwww.cloudcorner.gr%2Fmicrosoft%2Fazure%2Finfrastructure-as-code-deploy-a-vnet-nsg-udr%2F&amp;linkname=Infrastructure%20as%20Code%20%7C%20Deploy%20a%20VNET%20%26%20NSG%20%26%20UDR" title="Print" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.cloudcorner.gr%2Fmicrosoft%2Fazure%2Finfrastructure-as-code-deploy-a-vnet-nsg-udr%2F&#038;title=Infrastructure%20as%20Code%20%7C%20Deploy%20a%20VNET%20%26%20NSG%20%26%20UDR" data-a2a-url="https://www.cloudcorner.gr/microsoft/azure/infrastructure-as-code-deploy-a-vnet-nsg-udr/" data-a2a-title="Infrastructure as Code | Deploy a VNET &amp; NSG &amp; UDR"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://www.cloudcorner.gr/microsoft/azure/infrastructure-as-code-deploy-a-vnet-nsg-udr/">Infrastructure as Code | Deploy a VNET &#038; NSG &#038; UDR</a> appeared first on <a href="https://www.cloudcorner.gr">Apostolidis Cloud Corner</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.cloudcorner.gr/microsoft/azure/infrastructure-as-code-deploy-a-vnet-nsg-udr/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Create Azure File Shares at your ARM template using PowerShell</title>
		<link>https://www.cloudcorner.gr/microsoft/azure/create-azure-file-shares-using-arm-template-powershell/</link>
					<comments>https://www.cloudcorner.gr/microsoft/azure/create-azure-file-shares-using-arm-template-powershell/#respond</comments>
		
		<dc:creator><![CDATA[Pantelis Apostolidis]]></dc:creator>
		<pubDate>Thu, 28 Sep 2017 13:51:43 +0000</pubDate>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[IaC]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[azure file storage]]></category>
		<category><![CDATA[azurerm]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[template]]></category>
		<guid isPermaLink="false">https://www.e-apostolidis.gr/?p=1499</guid>

					<description><![CDATA[<p>Create Azure File Shares at your ARM template using PowerShell Using Azure Resource Manage template deployment, you can create a</p>
<p>The post <a href="https://www.cloudcorner.gr/microsoft/azure/create-azure-file-shares-using-arm-template-powershell/">Create Azure File Shares at your ARM template using PowerShell</a> appeared first on <a href="https://www.cloudcorner.gr">Apostolidis Cloud Corner</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Create Azure File Shares at your ARM template using PowerShell</h2>
<p style="text-align: justify;">Using Azure Resource Manage template deployment, you can create a Storage account but you cannot create File Shares. Azure File Shares can be created using the Azure Portal, the Azure PowerShell or the Azure Cli.</p>
<p style="text-align: justify;">Mainly, the idea is to run a PowerShell script that will create the File Shares. This script will be invoked inside the ARM Template. In order to use a PowerShell script from a template, the script must be called from a URL. A good way to provide this is using the Git repository.  One major thing to consider is the Storage Account key must be provided to the PowerShell script securely, since the PowerShell script is at a public URL.</p>
<p style="text-align: justify;">The PowerShell script will run inside a Virtual Machine and we will use a CustomScriptExtension Extension to provide it. To use this, at the Virtual Machine Resource of the JSON file add a resources section.</p>
<p style="text-align: justify;">The Custom Script Exception is located at the Virtual Machine resource. Lets assume that the last part of the Virtual Machine resource is the &#8220;diagnosticsProfile&#8221; so after the closure of the &#8220;diagnosticsProfile&#8221; we can add the &#8220;resources&#8221;. Inside the &#8220;resources&#8221; add the &#8220;extensions&#8221; resource that will add the &#8220;CustomScriptExtension&#8221;, like below.</p>
<h3>The Template Part</h3>
<p>This will be the addition at the Virtual Machine resource:</p>
<pre class="theme:vs2012 lang:asp decode:true"> "diagnosticsProfile": {
          "bootDiagnostics": {
            "enabled": true,
            "storageUri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('diagnosticStorageAccountName')), '2016-01-01').primaryEndpoints.blob)]"
          }
        }
        },
        "resources": [
          {
            "name": "AzureFileShares",
            "type": "extensions",
            "location": "[variables('location')]",
            "apiVersion": "2016-03-30",
            "dependsOn": [
              "[resourceId('Microsoft.Compute/virtualMachines', parameters('VMName'))]",
              "[variables('AzureFilesStorageId')]"
            ],
            "tags": {
              "displayName": "AzureFileShares"
            },
            "properties": {
              "publisher": "Microsoft.Compute",
              "type": "CustomScriptExtension",
              "typeHandlerVersion": "1.4",
              "autoUpgradeMinorVersion": true,
              "settings": {
                "fileUris": [
                  "https://raw.githubusercontent.com/######/#####/master/azurefiles.ps1"
                ]
              },
              "protectedSettings": {
               "commandToExecute": "[concat('powershell -ExecutionPolicy Unrestricted -File ','azurefiles.ps1 -SAName ',parameters('AzureFilesStorageName'),'  -SAKey ', listKeys(resourceId(variables('AzureFilesStorageAccountResourceGroup'),'Microsoft.Storage/storageAccounts', parameters('AzureFilesStorageName')), '2015-06-15').key1)]" 
             }
            }
          }
        ]
    },</pre>
<p style="text-align: justify;">The extension must be depended from the Virtual Machine that will run the script and the Storage Account that will bu used for the file shares.</p>
<p style="text-align: justify;">At the custom script properties add the public RAW url of the PowerShell script.</p>
<p style="text-align: justify;">Next lets see the Storage Account key and execution part. At the connandToExecute section, we will provide a variable that will pass the Storage Account key &amp; Name inside the script for execution. The variable will get the Storage Account key from the Storage Account using the permissions of the Account  running the Template Deployment.</p>
<p style="text-align: justify;">Of course to make the template more flexible I have added a variable for the Resource Group and a parameter for the AzureFilesStorageName, so the template will ask for the Storage Account name at the parameters.</p>
<h3>The PowerShell</h3>
<p>The PowerShell script is tested at Windows Server 2016 VM. You can find it below:</p>
<pre class="lang:ps decode:true ">Param (
  [Parameter()]
  [String]$SAKey,
  [String]$SAName
)
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
Install-Module Azure -Confirm:$False
Import-Module Azure
$storageContext = New-AzureStorageContext -StorageAccountName $SAName -StorageAccountKey $SourceSAKey
$storageContext |  New-AzureStorageShare -Name #####</pre>
<p>&nbsp;</p>
<div class="saboxplugin-wrap" itemtype="http://schema.org/Person" itemscope itemprop="author">
<div class="saboxplugin-tab">
<div class="saboxplugin-gravatar"><img loading="lazy" decoding="async" src="https://www.e-apostolidis.gr/wp-content/uploads/2019/05/mvpsummit2019.jpg" width="100"  height="100" alt="Pantelis Apostolidis" itemprop="image"></div>
<div class="saboxplugin-authorname"><a href="https://www.cloudcorner.gr/author/admin/" class="vcard author" rel="author"><span class="fn">Pantelis Apostolidis</span></a></div>
<div class="saboxplugin-desc">
<div itemprop="description">
<p>Pantelis Apostolidis is a Sr. Specialist, Azure at Microsoft and a former Microsoft Azure MVP. For the last 20 years, Pantelis has been involved to major cloud projects in Greece and abroad, helping companies to adopt and deploy cloud technologies, driving business value. He is entitled to a lot of Microsoft Expert Certifications, demonstrating his proven experience in delivering high quality solutions. He is an author, blogger and he is acting as a spokesperson for conferences, workshops and webinars. He is also an active member of several communities as a moderator in azureheads.gr and autoexec.gr. Follow him on Twitter @papostolidis.</p>
</div>
</div>
<div class="saboxplugin-web "><a href="https://www.cloudcorner.gr" target="_self" >www.cloudcorner.gr</a></div>
<div class="clearfix"></div>
<div class="saboxplugin-socials "><a title="Facebook" target="_blank" href="https://www.facebook.com/pantelis.apostolidis" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-facebook" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 264 512"><path fill="currentColor" d="M76.7 512V283H0v-91h76.7v-71.7C76.7 42.4 124.3 0 193.8 0c33.3 0 61.9 2.5 70.2 3.6V85h-48.2c-37.8 0-45.1 18-45.1 44.3V192H256l-11.7 91h-73.6v229"></path></svg></span></a><a title="Linkedin" target="_blank" href="https://www.linkedin.com/in/papostolidis/" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-linkedin" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M100.3 480H7.4V180.9h92.9V480zM53.8 140.1C24.1 140.1 0 115.5 0 85.8 0 56.1 24.1 32 53.8 32c29.7 0 53.8 24.1 53.8 53.8 0 29.7-24.1 54.3-53.8 54.3zM448 480h-92.7V334.4c0-34.7-.7-79.2-48.3-79.2-48.3 0-55.7 37.7-55.7 76.7V480h-92.8V180.9h89.1v40.8h1.3c12.4-23.5 42.7-48.3 87.9-48.3 94 0 111.3 61.9 111.3 142.3V480z"></path></svg></span></a><a title="Instagram" target="_blank" href="https://www.instagram.com/proximagr" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-instagram" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"></path></svg></span></a><a title="Rss" target="_blank" href="https://wwwcloudcorner.gr/feed/rdf/" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-rss" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M128.081 415.959c0 35.369-28.672 64.041-64.041 64.041S0 451.328 0 415.959s28.672-64.041 64.041-64.041 64.04 28.673 64.04 64.041zm175.66 47.25c-8.354-154.6-132.185-278.587-286.95-286.95C7.656 175.765 0 183.105 0 192.253v48.069c0 8.415 6.49 15.472 14.887 16.018 111.832 7.284 201.473 96.702 208.772 208.772.547 8.397 7.604 14.887 16.018 14.887h48.069c9.149.001 16.489-7.655 15.995-16.79zm144.249.288C439.596 229.677 251.465 40.445 16.503 32.01 7.473 31.686 0 38.981 0 48.016v48.068c0 8.625 6.835 15.645 15.453 15.999 191.179 7.839 344.627 161.316 352.465 352.465.353 8.618 7.373 15.453 15.999 15.453h48.068c9.034-.001 16.329-7.474 16.005-16.504z"></path></svg></span></a><a title="Twitter" target="_blank" href="https://twitter.com/papostolidis" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-twitter" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30"><path d="M26.37,26l-8.795-12.822l0.015,0.012L25.52,4h-2.65l-6.46,7.48L11.28,4H4.33l8.211,11.971L12.54,15.97L3.88,26h2.65 l7.182-8.322L19.42,26H26.37z M10.23,6l12.34,18h-2.1L8.12,6H10.23z" /></svg></span></a><a title="Github" target="_blank" href="https://github.com/proximagr" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-github" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path fill="currentColor" d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path></svg></span></a><a title="User email" target="_self" href="mailto:&#112;rox&#105;mag&#114;&#064;&#104;&#111;tma&#105;&#108;.&#099;o&#109;" rel="nofollow noopener" class="saboxplugin-icon-grey"><svg aria-hidden="true" class="sab-user_email" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"></path></svg></span></a></div>
</div>
</div>
<p><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.cloudcorner.gr%2Fmicrosoft%2Fazure%2Fcreate-azure-file-shares-using-arm-template-powershell%2F&amp;linkname=Create%20Azure%20File%20Shares%20at%20your%20ARM%20template%20using%20PowerShell" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_print" href="https://www.addtoany.com/add_to/print?linkurl=https%3A%2F%2Fwww.cloudcorner.gr%2Fmicrosoft%2Fazure%2Fcreate-azure-file-shares-using-arm-template-powershell%2F&amp;linkname=Create%20Azure%20File%20Shares%20at%20your%20ARM%20template%20using%20PowerShell" title="Print" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.cloudcorner.gr%2Fmicrosoft%2Fazure%2Fcreate-azure-file-shares-using-arm-template-powershell%2F&#038;title=Create%20Azure%20File%20Shares%20at%20your%20ARM%20template%20using%20PowerShell" data-a2a-url="https://www.cloudcorner.gr/microsoft/azure/create-azure-file-shares-using-arm-template-powershell/" data-a2a-title="Create Azure File Shares at your ARM template using PowerShell"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://www.cloudcorner.gr/microsoft/azure/create-azure-file-shares-using-arm-template-powershell/">Create Azure File Shares at your ARM template using PowerShell</a> appeared first on <a href="https://www.cloudcorner.gr">Apostolidis Cloud Corner</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.cloudcorner.gr/microsoft/azure/create-azure-file-shares-using-arm-template-powershell/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
