-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
28cbba4
commit b9d0234
Showing
9 changed files
with
139 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
param location string | ||
param vmSize string = 'Standard_B1s' | ||
param adminUsername string | ||
param adminPublicKey string | ||
param spokeVnetDetails array | ||
|
||
resource spokeVMs 'Microsoft.Compute/virtualMachines@2021-07-01' = [for (vnet, i) in spokeVnetDetails: { | ||
name: '${vnet.name}-vm' | ||
location: location | ||
properties: { | ||
hardwareProfile: { | ||
vmSize: vmSize | ||
} | ||
osProfile: { | ||
computerName: '${vnet.name}-vm' | ||
adminUsername: adminUsername | ||
linuxConfiguration: { | ||
disablePasswordAuthentication: true | ||
ssh: { | ||
publicKeys: [ | ||
{ | ||
path: '/home/${adminUsername}/.ssh/authorized_keys' | ||
keyData: adminPublicKey | ||
} | ||
] | ||
} | ||
} | ||
} | ||
storageProfile: { | ||
imageReference: { | ||
publisher: 'Canonical' | ||
offer: 'UbuntuServer' | ||
sku: '18.04-LTS' | ||
version: 'latest' | ||
} | ||
osDisk: { | ||
createOption: 'FromImage' | ||
managedDisk: { | ||
storageAccountType: 'Standard_LRS' | ||
} | ||
} | ||
} | ||
networkProfile: { | ||
networkInterfaces: [ | ||
{ | ||
id: resourceId('Microsoft.Network/networkInterfaces', '${vnet.name}-vm-nic') | ||
} | ||
] | ||
} | ||
} | ||
}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
param location string | ||
param hubVnetName string | ||
param bastionPublicIpName string = '${hubVnetName}-bastion-pip' | ||
|
||
resource bastionPublicIp 'Microsoft.Network/publicIPAddresses@2020-06-01' = { | ||
name: bastionPublicIpName | ||
location: location | ||
sku: { | ||
name: 'Standard' | ||
} | ||
properties: { | ||
publicIPAllocationMethod: 'Static' | ||
} | ||
} | ||
|
||
resource bastionHost 'Microsoft.Network/bastionHosts@2020-11-01' = { | ||
name: '${hubVnetName}-bastion' | ||
location: location | ||
properties: { | ||
ipConfigurations: [ | ||
{ | ||
name: '${hubVnetName}-bastion-config' | ||
properties: { | ||
subnet: { | ||
id: resourceId('Microsoft.Network/virtualNetworks/subnets', hubVnetName, 'AzureBastionSubnet') | ||
} | ||
publicIPAddress: { | ||
id: bastionPublicIp.id | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
|
||
output bastionPublicIPAddress string = bastionPublicIp.properties.ipAddress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters