Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update/secure hybrid network #237

Merged
merged 7 commits into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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