Skip to content

Commit 141759b

Browse files
committed
feat: add SMB scenarios 10 and 11, load scenarios from JSON
- Add path property to TerraformScenarios.json for all scenarios - Add scenario 10 (SMB Single-Region Hub and Spoke VNet) - Add scenario 11 (SMB Single-Region Virtual WAN) - Replace hardcoded scenario hashtable with dynamic JSON loading - Fix int64/int32 type mismatch when looking up scenario paths
1 parent 2190423 commit 141759b

2 files changed

Lines changed: 16 additions & 21 deletions

File tree

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[
2-
{ "label": "1 - Full Multi-Region - Hub and Spoke VNet", "value": 1 },
3-
{ "label": "2 - Full Multi-Region - Virtual WAN", "value": 2 },
4-
{ "label": "3 - Full Multi-Region NVA - Hub and Spoke VNet", "value": 3 },
5-
{ "label": "4 - Full Multi-Region NVA - Virtual WAN", "value": 4 },
6-
{ "label": "5 - Management Only", "value": 5 },
7-
{ "label": "6 - Full Single-Region - Hub and Spoke VNet", "value": 6 },
8-
{ "label": "7 - Full Single-Region - Virtual WAN", "value": 7 },
9-
{ "label": "8 - Full Single-Region NVA - Hub and Spoke VNet", "value": 8 },
10-
{ "label": "9 - Full Single-Region NVA - Virtual WAN", "value": 9 },
11-
{ "label": "10 - SMB Single-Region - Hub and Spoke VNet", "value": 10 },
12-
{ "label": "11 - SMB Single-Region - Virtual WAN", "value": 11 }
2+
{ "label": "1 - Full Multi-Region - Hub and Spoke VNet", "value": 1, "path": "full-multi-region/hub-and-spoke-vnet.tfvars" },
3+
{ "label": "2 - Full Multi-Region - Virtual WAN", "value": 2, "path": "full-multi-region/virtual-wan.tfvars" },
4+
{ "label": "3 - Full Multi-Region NVA - Hub and Spoke VNet", "value": 3, "path": "full-multi-region-nva/hub-and-spoke-vnet.tfvars" },
5+
{ "label": "4 - Full Multi-Region NVA - Virtual WAN", "value": 4, "path": "full-multi-region-nva/virtual-wan.tfvars" },
6+
{ "label": "5 - Management Only", "value": 5, "path": "management-only/management.tfvars" },
7+
{ "label": "6 - Full Single-Region - Hub and Spoke VNet", "value": 6, "path": "full-single-region/hub-and-spoke-vnet.tfvars" },
8+
{ "label": "7 - Full Single-Region - Virtual WAN", "value": 7, "path": "full-single-region/virtual-wan.tfvars" },
9+
{ "label": "8 - Full Single-Region NVA - Hub and Spoke VNet", "value": 8, "path": "full-single-region-nva/hub-and-spoke-vnet.tfvars" },
10+
{ "label": "9 - Full Single-Region NVA - Virtual WAN", "value": 9, "path": "full-single-region-nva/virtual-wan.tfvars" },
11+
{ "label": "10 - SMB Single-Region - Hub and Spoke VNet", "value": 10, "path": "smb-single-region/hub-and-spoke-vnet.tfvars" },
12+
{ "label": "11 - SMB Single-Region - Virtual WAN", "value": 11, "path": "smb-single-region/virtual-wan.tfvars" }
1313
]

src/ALZ/Public/New-AcceleratorFolderStructure.ps1

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,11 @@ function New-AcceleratorFolderStructure {
130130

131131
# Copy the platform landing zone configuration files based on scenario number or specific file path
132132
if ($repo.hasScenarios) {
133-
$scenarios = @{
134-
1 = "full-multi-region/hub-and-spoke-vnet.tfvars"
135-
2 = "full-multi-region/virtual-wan.tfvars"
136-
3 = "full-multi-region-nva/hub-and-spoke-vnet.tfvars"
137-
4 = "full-multi-region-nva/virtual-wan.tfvars"
138-
5 = "management-only/management.tfvars"
139-
6 = "full-single-region/hub-and-spoke-vnet.tfvars"
140-
7 = "full-single-region/virtual-wan.tfvars"
141-
8 = "full-single-region-nva/hub-and-spoke-vnet.tfvars"
142-
9 = "full-single-region-nva/virtual-wan.tfvars"
133+
$scenariosJsonPath = Join-Path $PSScriptRoot ".." "Private" "Deploy-Accelerator-Helpers" "TerraformScenarios.json"
134+
$scenarioOptions = Get-Content -Path $scenariosJsonPath -Raw | ConvertFrom-Json
135+
$scenarios = @{}
136+
foreach ($scenario in $scenarioOptions) {
137+
$scenarios[[int]$scenario.value] = $scenario.path
143138
}
144139

145140
Write-ToConsoleLog "Copying platform landing zone configuration file for scenario $scenarioNumber to $($targetFolderPath)/config/platform-landing-zone.tfvars"

0 commit comments

Comments
 (0)