Add files via upload

This commit is contained in:
staleycyn 2024-01-13 12:24:46 -08:00 committed by GitHub
parent 5327574d76
commit 342925a214
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,582 +1,237 @@
{ {
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0", "contentVersion": "1.0.0.0",
"parameters": { "parameters": {
"virtualMachines_az104_06_vm0_name": { "vmSize": {
"defaultValue": "az104-06-vm0", "type": "string",
"type": "String" "defaultValue": "Standard_D2s_v3",
"metadata": {
"description": "VM size"
}
}, },
"virtualMachines_az104_06_vm1_name": { "vmName": {
"defaultValue": "az104-06-vm1", "type": "string",
"type": "String" "defaultValue": "az104-06-vm",
"metadata": {
"description": "VM name Prefix"
}
}, },
"virtualMachines_az104_06_vm2_name": { "vmCount": {
"defaultValue": "az104-06-vm2", "type": "int",
"type": "String" "defaultValue": 4,
"metadata": {
"description": "Number of VMs"
}
}, },
"virtualNetworks_az104_06_vnet1_name": { "adminUsername": {
"defaultValue": "az104-06-vnet1", "type": "string",
"type": "String" "metadata": {
}, "description": "Admin username"
"networkInterfaces_az104_06_nic0_name": { }
"defaultValue": "az104-06-nic0",
"type": "String"
},
"networkInterfaces_az104_06_nic1_name": {
"defaultValue": "az104-06-nic1",
"type": "String"
},
"networkInterfaces_az104_06_nic2_name": {
"defaultValue": "az104-06-nic2",
"type": "String"
},
"networkSecurityGroups_az104_06_nsg1_name": {
"defaultValue": "az104-06-nsg1",
"type": "String"
}, },
"adminPassword": { "adminPassword": {
"defaultValue": null, "type": "securestring",
"type": "securestring" "metadata": {
"description": "Admin password"
}
} }
}, },
"variables": {}, "variables": {
"vmExtensionName": "customScriptExtension",
"nic": "az104-06-nic",
"virtualNetworkNames": "[createArray('az104-06-vnet01','az104-06-vnet01','az104-06-vnet2','az104-06-vnet3')]",
"virtualNetworkNamestbc": "[createArray('az104-06-vnet01','az104-06-vnet2','az104-06-vnet3')]",
"VNetPrefixes":"[createArray('10.60','10.62','10.63')]",
"nsgNames": "[createArray('az104-06-nsg01','az104-06-nsg01','az104-06-nsg2','az104-06-nsg3')]",
"nsgNamestbc": "[createArray('az104-06-nsg01','az104-06-nsg2','az104-06-nsg3')]",
"subnetName": "subnet",
"subnetRefs": "[createArray(0,1,0,0)]",
"computeApiVersion": "2018-06-01",
"networkApiVersion": "2018-08-01"
},
"resources": [ "resources": [
{ {
"type": "Microsoft.Network/networkSecurityGroups", "name": "[concat(parameters('vmName'),copyIndex())]",
"apiVersion": "2023-06-01", "copy": {
"name": "[parameters('networkSecurityGroups_az104_06_nsg1_name')]", "name": "VMcopy",
"location": "eastus", "count": "[parameters('vmCount')]"
},
"type": "Microsoft.Compute/virtualMachines",
"apiVersion": "[variables('computeApiVersion')]",
"location": "[resourceGroup().location]",
"comments": "Creating VMs",
"dependsOn": [
"[concat(variables('nic'),copyIndex())]"
],
"properties": { "properties": {
"securityRules": [ "osProfile": {
{ "computerName": "[concat(parameters('vmName'),copyIndex())]",
"name": "default-allow-rdp", "adminUsername": "[parameters('adminUsername')]",
"id": "[resourceId('Microsoft.Network/networkSecurityGroups/securityRules', parameters('networkSecurityGroups_az104_06_nsg1_name'), 'default-allow-rdp')]", "adminPassword": "[parameters('adminPassword')]",
"type": "Microsoft.Network/networkSecurityGroups/securityRules", "windowsConfiguration": {
"properties": { "provisionVmAgent": "true"
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "3389",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 1000,
"direction": "Inbound",
"sourcePortRanges": [],
"destinationPortRanges": [],
"sourceAddressPrefixes": [],
"destinationAddressPrefixes": []
}
},
{
"name": "default-allow-http",
"id": "[resourceId('Microsoft.Network/networkSecurityGroups/securityRules', parameters('networkSecurityGroups_az104_06_nsg1_name'), 'default-allow-http')]",
"type": "Microsoft.Network/networkSecurityGroups/securityRules",
"properties": {
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "80",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 1100,
"direction": "Inbound",
"sourcePortRanges": [],
"destinationPortRanges": [],
"sourceAddressPrefixes": [],
"destinationAddressPrefixes": []
}
} }
] },
"hardwareProfile": {
"vmSize": "[parameters('vmSize')]"
},
"storageProfile": {
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2019-Datacenter",
"version": "latest"
},
"osDisk": {
"createOption": "fromImage"
},
"dataDisks": []
},
"networkProfile": {
"networkInterfaces": [
{
"properties": {
"primary": true
},
"id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('nic'),copyIndex()))]"
}
]
}
}
},
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(concat(parameters('vmName'),copyIndex()), '/', variables('vmExtensionName'))]",
"copy": {
"name": "Extopy",
"count": "[parameters('vmCount')]"
},
"apiVersion": "[variables('computeApiVersion')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', concat(parameters('vmName'),copyIndex()))]"
],
"properties": {
"publisher": "Microsoft.Compute",
"type": "CustomScriptExtension",
"typeHandlerVersion": "1.7",
"autoUpgradeMinorVersion": true,
"settings": {
"commandToExecute": "powershell.exe Install-WindowsFeature -name Web-Server -IncludeManagementTools && powershell.exe remove-item 'C:\\inetpub\\wwwroot\\iisstart.htm' && powershell.exe Add-Content -Path 'C:\\inetpub\\wwwroot\\iisstart.htm' -Value $('Hello World from ' + $env:computername)"
}
} }
}, },
{ {
"type": "Microsoft.Network/virtualNetworks", "type": "Microsoft.Network/virtualNetworks",
"apiVersion": "2023-06-01", "name": "[variables('virtualNetworkNamestbc')[copyIndex()]]",
"name": "[parameters('virtualNetworks_az104_06_vnet1_name')]", "copy": {
"location": "eastus", "name": "VnetCopy",
"count": "[length(variables('virtualNetworkNamestbc'))]"
},
"apiVersion": "[variables('networkApiVersion')]",
"location": "[resourceGroup().location]",
"comments": "Virtual Network",
"properties": { "properties": {
"addressSpace": { "addressSpace": {
"addressPrefixes": [ "addressPrefixes": [
"10.60.0.0/22" "[concat(variables('VNetPrefixes')[copyIndex()],'.0.0/22')]"
] ]
}, },
"subnets": [ "subnets": [
{ {
"name": "subnet0", "name": "[concat(variables('subnetName'),'0')]",
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_az104_06_vnet1_name'), 'subnet0')]",
"properties": { "properties": {
"addressPrefix": "10.60.0.0/24", "addressPrefix": "[concat(variables('VNetPrefixes')[copyIndex()],'.0.0/24')]"
"delegations": [], }
"privateEndpointNetworkPolicies": "Disabled",
"privateLinkServiceNetworkPolicies": "Enabled"
},
"type": "Microsoft.Network/virtualNetworks/subnets"
},
{
"name": "subnet1",
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_az104_06_vnet1_name'), 'subnet1')]",
"properties": {
"addressPrefix": "10.60.1.0/24",
"delegations": [],
"privateEndpointNetworkPolicies": "Disabled",
"privateLinkServiceNetworkPolicies": "Enabled"
},
"type": "Microsoft.Network/virtualNetworks/subnets"
},
{
"name": "subnet2",
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_az104_06_vnet1_name'), 'subnet2')]",
"properties": {
"addressPrefix": "10.60.2.0/24",
"delegations": [],
"privateEndpointNetworkPolicies": "Disabled",
"privateLinkServiceNetworkPolicies": "Enabled"
},
"type": "Microsoft.Network/virtualNetworks/subnets"
} }
], ]
"virtualNetworkPeerings": [],
"enableDdosProtection": false
}
},
{
"type": "Microsoft.Compute/virtualMachines",
"apiVersion": "2023-03-01",
"name": "[parameters('virtualMachines_az104_06_vm0_name')]",
"location": "eastus",
"dependsOn": [
"[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_az104_06_nic0_name'))]"
],
"properties": {
"hardwareProfile": {
"vmSize": "Standard_D2s_v3"
},
"storageProfile": {
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2019-Datacenter",
"version": "latest"
},
"osDisk": {
"osType": "Windows",
"name": "[concat(parameters('virtualMachines_az104_06_vm0_name'), '_disk1_5e57d096d8d54757b417a168417a69f8')]",
"createOption": "FromImage",
"caching": "ReadWrite",
"deleteOption": "Detach",
"diskSizeGB": 127
},
"dataDisks": []
},
"osProfile": {
"computerName": "[parameters('virtualMachines_az104_06_vm0_name')]",
"adminUsername": "localadmin",
"adminPassword": "[parameters('adminPassword')]",
"windowsConfiguration": {
"provisionVMAgent": true,
"enableAutomaticUpdates": true,
"patchSettings": {
"patchMode": "AutomaticByOS",
"assessmentMode": "ImageDefault"
},
"enableVMAgentPlatformUpdates": false
},
"secrets": [],
"allowExtensionOperations": true
},
"networkProfile": {
"networkInterfaces": [
{
"id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_az104_06_nic0_name'))]",
"properties": {
"primary": true
}
}
]
}
}
},
{
"type": "Microsoft.Compute/virtualMachines",
"apiVersion": "2023-03-01",
"name": "[parameters('virtualMachines_az104_06_vm1_name')]",
"location": "eastus",
"dependsOn": [
"[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_az104_06_nic1_name'))]"
],
"properties": {
"hardwareProfile": {
"vmSize": "Standard_D2s_v3"
},
"storageProfile": {
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2019-Datacenter",
"version": "latest"
},
"osDisk": {
"osType": "Windows",
"name": "[concat(parameters('virtualMachines_az104_06_vm1_name'), '_disk1_0c60cd0e9f8d43aaaebfa572d1de0319')]",
"createOption": "FromImage",
"caching": "ReadWrite",
"deleteOption": "Detach",
"diskSizeGB": 127
},
"dataDisks": []
},
"osProfile": {
"computerName": "[parameters('virtualMachines_az104_06_vm1_name')]",
"adminUsername": "localadmin",
"adminPassword": "[parameters('adminPassword')]",
"windowsConfiguration": {
"provisionVMAgent": true,
"enableAutomaticUpdates": true,
"patchSettings": {
"patchMode": "AutomaticByOS",
"assessmentMode": "ImageDefault"
},
"enableVMAgentPlatformUpdates": false
},
"secrets": [],
"allowExtensionOperations": true
},
"networkProfile": {
"networkInterfaces": [
{
"id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_az104_06_nic1_name'))]",
"properties": {
"primary": true
}
}
]
}
}
},
{
"type": "Microsoft.Compute/virtualMachines",
"apiVersion": "2023-03-01",
"name": "[parameters('virtualMachines_az104_06_vm2_name')]",
"location": "eastus",
"dependsOn": [
"[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_az104_06_nic2_name'))]"
],
"properties": {
"hardwareProfile": {
"vmSize": "Standard_D2s_v3"
},
"storageProfile": {
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2019-Datacenter",
"version": "latest"
},
"osDisk": {
"osType": "Windows",
"name": "[concat(parameters('virtualMachines_az104_06_vm2_name'), '_disk1_58417ddb19d7418886b4b5c42507a7f0')]",
"createOption": "FromImage",
"caching": "ReadWrite",
"deleteOption": "Detach"
},
"dataDisks": []
},
"osProfile": {
"computerName": "[parameters('virtualMachines_az104_06_vm2_name')]",
"adminUsername": "localadmin",
"adminPassword": "[parameters('adminPassword')]",
"windowsConfiguration": {
"provisionVMAgent": true,
"enableAutomaticUpdates": true,
"patchSettings": {
"patchMode": "AutomaticByOS",
"assessmentMode": "ImageDefault"
},
"enableVMAgentPlatformUpdates": false
},
"secrets": [],
"allowExtensionOperations": true
},
"networkProfile": {
"networkInterfaces": [
{
"id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_az104_06_nic2_name'))]",
"properties": {
"primary": true
}
}
]
}
}
},
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"apiVersion": "2023-03-01",
"name": "[concat(parameters('virtualMachines_az104_06_vm0_name'), '/customScriptExtension')]",
"location": "eastus",
"dependsOn": [
"[resourceId('Microsoft.Compute/virtualMachines', parameters('virtualMachines_az104_06_vm0_name'))]"
],
"properties": {
"autoUpgradeMinorVersion": true,
"publisher": "Microsoft.Compute",
"type": "CustomScriptExtension",
"typeHandlerVersion": "1.7",
"settings": {
"commandToExecute": "powershell.exe Install-WindowsFeature -name Web-Server -IncludeManagementTools && powershell.exe remove-item 'C:\\inetpub\\wwwroot\\iisstart.htm' && powershell.exe Add-Content -Path 'C:\\inetpub\\wwwroot\\iisstart.htm' -Value $('Hello World from ' + $env:computername) && powershell.exe New-Item -Path 'c:\\inetpub\\wwwroot' -Name 'video' -Itemtype 'Directory' && powershell.exe New-Item -Path 'c:\\inetpub\\wwwroot\\video\\' -Name 'iisstart.htm' -ItemType 'file' && powershell.exe Add-Content -Path 'C:\\inetpub\\wwwroot\\video\\iisstart.htm' -Value $('Images from: ' + $env:computername)"
},
"protectedSettings": {}
}
},
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"apiVersion": "2023-03-01",
"name": "[concat(parameters('virtualMachines_az104_06_vm1_name'), '/customScriptExtension')]",
"location": "westus",
"dependsOn": [
"[resourceId('Microsoft.Compute/virtualMachines', parameters('virtualMachines_az104_06_vm1_name'))]"
],
"properties": {
"autoUpgradeMinorVersion": true,
"publisher": "Microsoft.Compute",
"type": "CustomScriptExtension",
"typeHandlerVersion": "1.7",
"settings": {
"commandToExecute": "powershell.exe Install-WindowsFeature -name Web-Server -IncludeManagementTools && powershell.exe remove-item 'C:\\inetpub\\wwwroot\\iisstart.htm' && powershell.exe Add-Content -Path 'C:\\inetpub\\wwwroot\\iisstart.htm' -Value $('Hello World from ' + $env:computername) && powershell.exe New-Item -Path 'c:\\inetpub\\wwwroot' -Name 'image' -Itemtype 'Directory' && powershell.exe New-Item -Path 'c:\\inetpub\\wwwroot\\image\\' -Name 'iisstart.htm' -ItemType 'file' && powershell.exe Add-Content -Path 'C:\\inetpub\\wwwroot\\image\\iisstart.htm' -Value $('Images from: ' + $env:computername)"
},
"protectedSettings": {}
}
},
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"apiVersion": "2023-03-01",
"name": "[concat(parameters('virtualMachines_az104_06_vm2_name'), '/customScriptExtension')]",
"location": "eastus",
"dependsOn": [
"[resourceId('Microsoft.Compute/virtualMachines', parameters('virtualMachines_az104_06_vm2_name'))]"
],
"properties": {
"autoUpgradeMinorVersion": true,
"publisher": "Microsoft.Compute",
"type": "CustomScriptExtension",
"typeHandlerVersion": "1.7",
"settings": {
"commandToExecute": "powershell.exe Install-WindowsFeature -name Web-Server -IncludeManagementTools && powershell.exe remove-item 'C:\\inetpub\\wwwroot\\iisstart.htm' && powershell.exe Add-Content -Path 'C:\\inetpub\\wwwroot\\iisstart.htm' -Value $('Hello World from ' + $env:computername) && powershell.exe New-Item -Path 'c:\\inetpub\\wwwroot' -Name 'video' -Itemtype 'Directory' && powershell.exe New-Item -Path 'c:\\inetpub\\wwwroot\\video\\' -Name 'iisstart.htm' -ItemType 'file' && powershell.exe Add-Content -Path 'C:\\inetpub\\wwwroot\\video\\iisstart.htm' -Value $('Videos from: ' + $env:computername)"
},
"protectedSettings": {}
}
},
{
"type": "Microsoft.Network/networkSecurityGroups/securityRules",
"apiVersion": "2023-06-01",
"name": "[concat(parameters('networkSecurityGroups_az104_06_nsg1_name'), '/default-allow-http')]",
"dependsOn": [
"[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_az104_06_nsg1_name'))]"
],
"properties": {
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "80",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 1100,
"direction": "Inbound",
"sourcePortRanges": [],
"destinationPortRanges": [],
"sourceAddressPrefixes": [],
"destinationAddressPrefixes": []
}
},
{
"type": "Microsoft.Network/networkSecurityGroups/securityRules",
"apiVersion": "2023-06-01",
"name": "[concat(parameters('networkSecurityGroups_az104_06_nsg1_name'), '/default-allow-rdp')]",
"dependsOn": [
"[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_az104_06_nsg1_name'))]"
],
"properties": {
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "3389",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 1000,
"direction": "Inbound",
"sourcePortRanges": [],
"destinationPortRanges": [],
"sourceAddressPrefixes": [],
"destinationAddressPrefixes": []
}
},
{
"type": "Microsoft.Network/virtualNetworks/subnets",
"apiVersion": "2023-06-01",
"name": "[concat(parameters('virtualNetworks_az104_06_vnet1_name'), '/subnet0')]",
"dependsOn": [
"[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworks_az104_06_vnet1_name'))]"
],
"properties": {
"addressPrefix": "10.60.0.0/24",
"delegations": [],
"privateEndpointNetworkPolicies": "Disabled",
"privateLinkServiceNetworkPolicies": "Enabled"
}
},
{
"type": "Microsoft.Network/virtualNetworks/subnets",
"apiVersion": "2023-06-01",
"name": "[concat(parameters('virtualNetworks_az104_06_vnet1_name'), '/subnet1')]",
"dependsOn": [
"[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworks_az104_06_vnet1_name'))]"
],
"properties": {
"addressPrefix": "10.60.1.0/24",
"delegations": [],
"privateEndpointNetworkPolicies": "Disabled",
"privateLinkServiceNetworkPolicies": "Enabled"
}
},
{
"type": "Microsoft.Network/virtualNetworks/subnets",
"apiVersion": "2023-06-01",
"name": "[concat(parameters('virtualNetworks_az104_06_vnet1_name'), '/subnet2')]",
"dependsOn": [
"[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworks_az104_06_vnet1_name'))]"
],
"properties": {
"addressPrefix": "10.60.2.0/24",
"delegations": [],
"privateEndpointNetworkPolicies": "Disabled",
"privateLinkServiceNetworkPolicies": "Enabled"
} }
}, },
{ "type": "Microsoft.Network/virtualNetworks/subnets",
"apiVersion": "[variables('networkApiVersion')]",
"location": "[resourceGroup().location]",
"comments": "Virtual Network Subnet for VNet01",
"name": "az104-06-vnet01/subnet1",
"properties": {
"addressPrefix": "10.60.1.0/24"
},
"dependsOn": [
"Microsoft.Network/virtualNetworks/az104-06-vnet01"
]
},
{ {
"name": "[concat(variables('nic'),copyIndex())]",
"copy":{
"name": "nicCopy",
"count": "[parameters('vmCount')]"
},
"type": "Microsoft.Network/networkInterfaces", "type": "Microsoft.Network/networkInterfaces",
"apiVersion": "2023-06-01", "apiVersion": "[variables('networkApiVersion')]",
"name": "[parameters('networkInterfaces_az104_06_nic0_name')]", "location": "[resourceGroup().location]",
"location": "eastus", "comments": "Primary NIC",
"dependsOn": [ "dependsOn": [
"[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_az104_06_vnet1_name'), 'subnet0')]", "[variables('nsgNames')[copyindex()]]",
"[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_az104_06_nsg1_name'))]" "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkNames')[copyIndex()])]"
], ],
"kind": "Regular",
"properties": { "properties": {
"ipConfigurations": [ "ipConfigurations": [
{ {
"name": "ipconfig1", "name": "ipconfig1",
"id": "[concat(resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_az104_06_nic0_name')), '/ipConfigurations/ipconfig1')]",
"etag": "W/\"2690d608-0b02-47be-a9c9-38f240a8bfbf\"",
"type": "Microsoft.Network/networkInterfaces/ipConfigurations",
"properties": { "properties": {
"provisioningState": "Succeeded",
"privateIPAddress": "10.60.0.4",
"privateIPAllocationMethod": "Dynamic",
"subnet": { "subnet": {
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_az104_06_vnet1_name'), 'subnet0')]" "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkNames')[copyIndex()], concat(variables('subnetName'),variables('subnetRefs')[copyindex()]))]"
}, },
"primary": true, "privateIPAllocationMethod": "Dynamic"
"privateIPAddressVersion": "IPv4"
} }
} }
], ],
"dnsSettings": {
"dnsServers": []
},
"enableIPForwarding": false,
"disableTcpStateTracking": false,
"networkSecurityGroup": { "networkSecurityGroup": {
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_az104_06_nsg1_name'))]" "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgNames')[copyIndex()])]"
}, }
"nicType": "Standard",
"auxiliaryMode": "None",
"auxiliarySku": "None"
} }
}, },
{ {
"type": "Microsoft.Network/networkInterfaces", "name": "[variables('nsgNamestbc')[copyIndex()]]",
"apiVersion": "2023-06-01", "copy": {
"name": "[parameters('networkInterfaces_az104_06_nic1_name')]", "name": "nsgCopy",
"location": "eastus", "count": 3
"dependsOn": [ },
"[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_az104_06_vnet1_name'), 'subnet1')]", "type": "Microsoft.Network/networkSecurityGroups",
"[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_az104_06_nsg1_name'))]" "apiVersion": "[variables('networkApiVersion')]",
], "location": "[resourceGroup().location]",
"kind": "Regular", "comments": "Network Security Group (NSG) for Primary NIC",
"properties": { "properties": {
"ipConfigurations": [ "securityRules": [
{ {
"name": "ipconfig1", "name": "default-allow-rdp",
"id": "[concat(resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_az104_06_nic1_name')), '/ipConfigurations/ipconfig1')]",
"etag": "W/\"a65f582b-ab26-4a99-aa7f-f5ff9c7c6756\"",
"type": "Microsoft.Network/networkInterfaces/ipConfigurations",
"properties": { "properties": {
"provisioningState": "Succeeded", "priority": 1000,
"privateIPAddress": "10.60.1.4", "sourceAddressPrefix": "*",
"privateIPAllocationMethod": "Dynamic", "protocol": "Tcp",
"subnet": { "destinationPortRange": "3389",
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_az104_06_vnet1_name'), 'subnet1')]" "access": "Allow",
}, "direction": "Inbound",
"primary": true, "sourcePortRange": "*",
"privateIPAddressVersion": "IPv4" "destinationAddressPrefix": "*"
}
},
{
"name": "default-allow-http",
"properties": {
"priority": 1100,
"sourceAddressPrefix": "*",
"protocol": "Tcp",
"destinationPortRange": "80",
"access": "Allow",
"direction": "Inbound",
"sourcePortRange": "*",
"destinationAddressPrefix": "*"
} }
} }
], ]
"dnsSettings": {
"dnsServers": []
},
"enableIPForwarding": false,
"disableTcpStateTracking": false,
"networkSecurityGroup": {
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_az104_06_nsg1_name'))]"
},
"nicType": "Standard",
"auxiliaryMode": "None",
"auxiliarySku": "None"
}
},
{
"type": "Microsoft.Network/networkInterfaces",
"apiVersion": "2023-06-01",
"name": "[parameters('networkInterfaces_az104_06_nic2_name')]",
"location": "eastus",
"dependsOn": [
"[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_az104_06_vnet1_name'), 'subnet2')]",
"[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_az104_06_nsg1_name'))]"
],
"kind": "Regular",
"properties": {
"ipConfigurations": [
{
"name": "ipconfig1",
"id": "[concat(resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_az104_06_nic2_name')), '/ipConfigurations/ipconfig1')]",
"etag": "W/\"52827e59-e77e-4722-89a1-e79cee3c4b41\"",
"type": "Microsoft.Network/networkInterfaces/ipConfigurations",
"properties": {
"provisioningState": "Succeeded",
"privateIPAddress": "10.62.0.4",
"privateIPAllocationMethod": "Dynamic",
"subnet": {
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_az104_06_vnet1_name'), 'subnet2')]"
},
"primary": true,
"privateIPAddressVersion": "IPv4"
}
}
],
"dnsSettings": {
"dnsServers": []
},
"enableIPForwarding": false,
"disableTcpStateTracking": false,
"networkSecurityGroup": {
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_az104_06_nsg1_name'))]"
},
"nicType": "Standard",
"auxiliaryMode": "None",
"auxiliarySku": "None"
} }
} }
] ],
} "outputs": {}
}