Skip to content

Commit ebd82c8

Browse files
committed
refactor: extract Terraform scenarios to JSON config file and add SMB scenarios
1 parent a7b0b3c commit ebd82c8

2 files changed

Lines changed: 15 additions & 11 deletions

File tree

src/ALZ/Private/Deploy-Accelerator-Helpers/Request-AcceleratorConfigurationInput.ps1

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -161,17 +161,8 @@ function Request-AcceleratorConfigurationInput {
161161

162162
# Prompt for scenario number (Terraform only)
163163
if ($selectedIacType -eq "terraform") {
164-
$scenarioOptions = @(
165-
@{ label = "1 - Full Multi-Region - Hub and Spoke VNet"; value = 1 },
166-
@{ label = "2 - Full Multi-Region - Virtual WAN"; value = 2 },
167-
@{ label = "3 - Full Multi-Region NVA - Hub and Spoke VNet"; value = 3 },
168-
@{ label = "4 - Full Multi-Region NVA - Virtual WAN"; value = 4 },
169-
@{ label = "5 - Management Only"; value = 5 },
170-
@{ label = "6 - Full Single-Region - Hub and Spoke VNet"; value = 6 },
171-
@{ label = "7 - Full Single-Region - Virtual WAN"; value = 7 },
172-
@{ label = "8 - Full Single-Region NVA - Hub and Spoke VNet"; value = 8 },
173-
@{ label = "9 - Full Single-Region NVA - Virtual WAN"; value = 9 }
174-
)
164+
$scenariosJsonPath = Join-Path $PSScriptRoot "TerraformScenarios.json"
165+
$scenarioOptions = Get-Content -Path $scenariosJsonPath -Raw | ConvertFrom-Json
175166

176167
$selectedScenarioNumber = Read-MenuSelection `
177168
-Title "Select the Terraform scenario (see https://aka.ms/alz/acc/scenarios):" `
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[
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 }
13+
]

0 commit comments

Comments
 (0)