-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathGet-Configuration.ps1
More file actions
31 lines (26 loc) · 988 Bytes
/
Get-Configuration.ps1
File metadata and controls
31 lines (26 loc) · 988 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
function Get-Configuration {
param(
[Parameter(Mandatory = $false)]
[ValidateSet("bicep", "terraform")]
[string] $alzIacProvider = "bicep",
[Parameter(Mandatory = $false)]
[string] $alzEnvironmentDestination = ".",
[Parameter(Mandatory = $false)]
[string] $alzBicepVersion = "v0.13.0"
)
<#
.SYNOPSIS
This function uses a template configuration to prompt for and return a user specified/modified configuration object.
.EXAMPLE
Get-Configuration
.EXAMPLE
Get-Configuration -alzIacProvider "bicep"
.OUTPUTS
System.Object. The resultant configuration values.
#>
if ($alzIacProvider -eq "terraform") {
throw "Terraform is not yet supported."
}
$uxConfigurationFile = Join-Path $alzEnvironmentDestination "alz-bicep-config" "$alzBicepVersion.ux.config.json"
return Get-Content -Path $uxConfigurationFile -Raw | ConvertFrom-Json
}