-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add config file specific code (#100)
# Pull Request ## Issue Issue #, if available: N/A ## Description Description of changes: This PR adds the ability to pass a config file path that is then included in the repository. This is to be more concise for users of the accelerator and only prompt for a config file if they are using a starter module that needs one. Also enables them to call the config file whatever name they desire. This change has been tested and testing evidence can be found in the sister PR here: Azure/alz-terraform-accelerator#89 ## License By submitting this pull request, I confirm that my contribution is made under the terms of the projects associated license.
- Loading branch information
1 parent
9b37fee
commit adb21f4
Showing
6 changed files
with
41 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
function Import-ConfigurationFileData { | ||
<# | ||
#> | ||
param( | ||
[Parameter(Mandatory = $false)] | ||
[PSCustomObject] $starterModuleConfiguration, | ||
[Parameter(Mandatory = $false)] | ||
[PSCustomObject] $bootstrapConfiguration | ||
) | ||
|
||
$configurationFilePathObjects = ($starterModuleConfiguration.PsObject.Properties | Where-Object { $_.Value.Validator -eq "configuration_file_path" }) | ||
|
||
if($configurationFilePathObjects.Count -eq 0) { | ||
return | ||
} | ||
|
||
$configurationFilePath = $configurationFilePathObjects[0].Value.Value | ||
$bootstrapConfigurationFilePathObject = $bootstrapConfiguration.PsObject.Properties | Where-Object { $_.Value.Validator -eq "hidden_configuration_file_path" } | ||
$bootstrapConfigurationFilePathObject.Value.Value = $configurationFilePath | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters