Skip to content

Commit 7b50ab3

Browse files
Updates to solution/avnm secured hub and spoke (#241)
* update * mspnp * Security Advice * Adapting to new suggestion * Implementing new security improvement suggestion * Improvements * Readme Change * Addressing PR comments * Addressing PR comments * Api version and choosing a location path * Removing location parameter * Update solutions/avnm-secured-hub-and-spoke/bicep/main.bicep Co-authored-by: Fernando Antivero <[email protected]> --------- Co-authored-by: Federico Arambarri <v-fearam> Co-authored-by: Fernando Antivero <[email protected]>
1 parent 90320aa commit 7b50ab3

File tree

11 files changed

+88
-1682
lines changed

11 files changed

+88
-1682
lines changed

solutions/avnm-mesh-connected-group/bicep/main.json

-917
This file was deleted.

solutions/avnm-secured-hub-and-spoke/README.md

+18-26
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
page_type: sample
33
languages:
4-
- azurepowershell
5-
- azurecli
4+
- azurepowershell
5+
- azurecli
66
products:
77
- azure
88
- azure-virtual-network
@@ -15,44 +15,36 @@ urlFragment: virtual-network-manager-secured-hub-and-spoke
1515

1616
This sample deploys Azure virtual networks in a hub and spoke configuration, using Azure Virtual Network Manager to manage Virtual Network connectivity and implement sample Security Admin Rules. A VPN Gateway and test VMs are deployed to complete the hub and spoke features.
1717

18-
1918
## Deploy sample
2019

21-
### Step 1: Create a Resource Group for the sample resources
22-
23-
Create a resource group for the deployment.
20+
### Step 1: Clone repository and navigate to the correct folder
2421

25-
```azurecli-interactive
26-
az group create --name hub-spoke --location eastus
22+
```bash
23+
git clone https://github.com/mspnp/samples.git
24+
cd ./samples/solutions/avnm-secured-hub-and-spoke/bicep
2725
```
2826

2927
### Step 2: Deploy infrastructure and Virtual Network Manager resources
3028

31-
```azurecli-interactive
32-
az deployment group create \
33-
--resource-group hub-spoke \
34-
--template-uri https://raw.githubusercontent.com/mspnp/samples/main/solutions/avnm-secured-hub-and-spoke/armTemplates/avnmResources.json
35-
```
36-
37-
### Step 3: Deploy Virtual Network Manager Dynamic Network Group Policy resources
29+
```bash
30+
# Generate ssh key and get public data.
31+
ssh-keygen -t rsa -b 2048
3832

39-
```azurecli-interactive
40-
az deployment subscription create \
41-
--template-uri https://raw.githubusercontent.com/mspnp/samples/main/solutions/avnm-secured-hub-and-spoke/armTemplates/avmnDynamicMembershipPolicy.json
33+
az deployment sub create --location eastus --template-file main.bicep -n avnm-secured-hub-and-spoke --parameters sshKey="$(cat ~/.ssh/id_rsa.pub)"
4234
```
4335

4436
## Solution deployment parameters
4537

46-
| Parameter | Type | Description | Default |
47-
|---|---|---|--|
48-
| `location` | string | Deployment location | `resourceGroup().location` |
49-
| `adminUserName` | string | The admin user name for deployed VMs. | `admin-avnm` |
50-
| `adminPassword` | securestring | The admin password for deployed VMs. | `null` |
51-
38+
| Parameter | Type | Description | Default |
39+
| --------------- | ------------ | ------------------------------------- | -------------------------- |
40+
| `adminUserName` | string | The admin user name for deployed VMs. | `admin-avnm` |
41+
| `sshkey` | string | The user's public SSH key to be added to the Linux machines as part of the `ssh_authorized_keys` list | |
5242

53-
## Bicep implementation
43+
## Step 4: Clean Up
5444

55-
The links above use JSON Azure Resource Manager (ARM) templates to support network referencing. The ARM templates were generated from the following [source bicep file](https://github.com/mspnp/samples/blob/main/solutions/avnm-secured-hub-and-spoke/bicep/main.bicep), which has additional comments and considerations.
45+
```bash
46+
az group delete --name rg-hub-spoke-eastus --yes
47+
```
5648

5749
## Microsoft Open Source Code of Conduct
5850

solutions/avnm-secured-hub-and-spoke/armTemplates/README.md

-31
This file was deleted.

solutions/avnm-secured-hub-and-spoke/armTemplates/avmnDynamicMembershipPolicy.json

-85
This file was deleted.

0 commit comments

Comments
 (0)