Skip to content

Commit

Permalink
Merge pull request #237 from mspnp/update/secure-hybrid-network
Browse files Browse the repository at this point in the history
Update/secure hybrid network
  • Loading branch information
v-fearam authored Dec 27, 2023
2 parents e51a1de + 9b3eff1 commit 69a575d
Show file tree
Hide file tree
Showing 10 changed files with 1,221 additions and 11 deletions.
6 changes: 3 additions & 3 deletions solutions/secure-hybrid-network/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ For detailed information, see the Implement a secure hybrid network:
## Deploy sample

Run the following command to initiate the deployment. When prompted, enter values for an admin user name and password. These values are used to log into the included virtual machines.
Clone this repo and then run the following commands to initiate the deployment. When prompted, enter values for an admin username and password. These values are used to log into the included virtual machines.

```azurecli-interactive
az deployment sub create \
--template-uri https://raw.githubusercontent.com/mspnp/samples/main/solutions/secure-hybrid-network/azuredeploy.json --location eastus
cd solutions/secure-hybrid-network
az deployment sub create --location eastus --template-file azuredeploy.bicep
```

## Solution deployment parameters
Expand Down
64 changes: 64 additions & 0 deletions solutions/secure-hybrid-network/azuredeploy.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
targetScope = 'subscription'
param mocOnPremResourceGroup string = 'site-to-site-mock-prem'
param azureNetworkResourceGroup string = 'site-to-site-azure-network'

@description('The admin user name for both the Windows and Linux virtual machines.')
param adminUserName string

@description('The admin password for both the Windows and Linux virtual machines.')
@secure()
param adminPassword string
param resourceGrouplocation string = 'eastus'

resource mocOnPremResourceGroup_resource 'Microsoft.Resources/resourceGroups@2022-09-01' = {
name: mocOnPremResourceGroup
location: resourceGrouplocation
}

resource azureNetworkResourceGroup_resource 'Microsoft.Resources/resourceGroups@2022-09-01' = {
name: azureNetworkResourceGroup
location: resourceGrouplocation
}

module onPremMock 'nestedtemplates/mock-onprem-azuredeploy.bicep' = {
name: 'onPremMock'
scope: mocOnPremResourceGroup_resource
params: {
adminUserName: adminUserName
adminPassword: adminPassword
location: resourceGrouplocation
}
}

module azureNetwork 'nestedtemplates/azure-network-azuredeploy.bicep' = {
name: 'azureNetwork'
scope: azureNetworkResourceGroup_resource
params: {
adminUserName: adminUserName
adminPassword: adminPassword
location: resourceGrouplocation
}
}

module mockOnPremLocalGateway 'nestedtemplates/mock-onprem-local-gateway.bicep' = {
name: 'mockOnPremLocalGateway'
scope: mocOnPremResourceGroup_resource
params: {
gatewayIpAddress: azureNetwork.outputs.vpnIp
azureCloudVnetPrefix: azureNetwork.outputs.mocOnpremNetwork
spokeNetworkAddressPrefix: azureNetwork.outputs.spokeNetworkAddressPrefix
mocOnpremGatewayName: onPremMock.outputs.mocOnpremGatewayName
location: resourceGrouplocation
}
}

module azureNetworkLocalGateway 'nestedtemplates/azure-network-local-gateway.bicep' = {
name: 'azureNetworkLocalGateway'
scope: azureNetworkResourceGroup_resource
params: {
azureCloudVnetPrefix: onPremMock.outputs.mocOnpremNetworkPrefix
gatewayIpAddress: onPremMock.outputs.vpnIp
azureNetworkGatewayName: azureNetwork.outputs.azureGatewayName
location: resourceGrouplocation
}
}
Loading

0 comments on commit 69a575d

Please sign in to comment.