Skip to content

Instantly share code, notes, and snippets.

View rwaal's full-sized avatar

Richard Waal rwaal

View GitHub Profile
@rwaal
rwaal / Assign-PublicIP.ps1
Created March 9, 2020 20:34
Associate Azure Public IP to an existing Network Interface using Powershell
$pip = New-AzPublicIpAddress -Name 'MyPublicIpName' -ResourceGroupName 'MyResourceGroupName' -Sku 'Basic' -AllocationMethod 'Dynamic' -Location 'West Europe'
$vnet = Get-AzVirtualNetwork -Name 'MyVnetName' -ResourceGroupName 'MyResourceGroupName'
$subnet = Get-AzVirtualNetworkSubnetConfig -Name 'MySubnetName' -VirtualNetwork $vnet
$nic = Get-AzNetworkInterface -Name 'MyNicName' -ResourceGroupName 'MyResourceGroupName'
$ipconfig = New-AzNetworkInterfaceIpConfig -Name 'MyIpConfigName' -Subnet $subnet -PublicIpAddress $pip
$nic | Add-AzNetworkInterfaceIpConfig -Name $ipconfigName -Subnet $subnet -PublicIpAddress $pip
$nic | Set-AzNetworkInterface
@rwaal
rwaal / azuredeploy.infrastructureparameter.json
Last active October 9, 2018 18:44
DevOps with Sitecore on Azure Part 1 – Deploying into an App Service Environment
"AseResourceId": {
"value": "[parameters('AseResourceId')]"
},
@rwaal
rwaal / azurediagsettings-resources.json
Last active September 16, 2021 15:15
Configure multiple Azure diagnostic settings with ARM templates
"resources": [
{
"type": "Microsoft.Logic/workflows",
"name": "[parameters('logicAppName')]",
"apiVersion": "2016-10-01",
"location": "[resourceGroup().location]",
"properties": {
"definition": "[parameters('logicAppDefinition')]",
"parameters": {},
"state": "Enabled"