From ec2a8bfc4af1920223b539580d533fd4797dfb38 Mon Sep 17 00:00:00 2001 From: Jared Holgate Date: Wed, 10 Jan 2024 11:16:21 +0000 Subject: [PATCH] bug: fix missing auto approve flag (#97) # Pull Request ## Issue Issue #, if available: N/A ## Description This PR fixes a bug where the auto approve parameter is not being passed to the function that gets the variables. This is causing the module to prompt for user input when it should not. ## License By submitting this pull request, I confirm that my contribution is made under the terms of the projects associated license. --- src/ALZ/Private/New-ALZEnvironmentTerraform.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ALZ/Private/New-ALZEnvironmentTerraform.ps1 b/src/ALZ/Private/New-ALZEnvironmentTerraform.ps1 index baf0f49..5bbc2f2 100644 --- a/src/ALZ/Private/New-ALZEnvironmentTerraform.ps1 +++ b/src/ALZ/Private/New-ALZEnvironmentTerraform.ps1 @@ -69,7 +69,7 @@ function New-ALZEnvironmentTerraform { $cachedBootstrapConfig = Get-ALZConfig -configFilePath $bootstrapCachedValuesPath # Getting the user input for the bootstrap module - $bootstrapConfiguration = Request-ALZEnvironmentConfig -configurationParameters $bootstrapParameters -respectOrdering -userInputOverrides $userInputOverrides -userInputDefaultOverrides $cachedBootstrapConfig -treatEmptyDefaultAsValid $true + $bootstrapConfiguration = Request-ALZEnvironmentConfig -configurationParameters $bootstrapParameters -respectOrdering -userInputOverrides $userInputOverrides -userInputDefaultOverrides $cachedBootstrapConfig -treatEmptyDefaultAsValid $true -autoApprove:$autoApprove.IsPresent # Getting the configuration for the starter module user input $starterTemplate = $bootstrapConfiguration.PsObject.Properties["starter_module"].Value.Value @@ -85,7 +85,7 @@ function New-ALZEnvironmentTerraform { $cachedStarterModuleConfig = Get-ALZConfig -configFilePath $starterModuleCachedValuesPath # Getting the user input for the starter module - $starterModuleConfiguration = Request-ALZEnvironmentConfig -configurationParameters $starterModuleParameters -respectOrdering -userInputOverrides $userInputOverrides -userInputDefaultOverrides $cachedStarterModuleConfig -treatEmptyDefaultAsValid $true + $starterModuleConfiguration = Request-ALZEnvironmentConfig -configurationParameters $starterModuleParameters -respectOrdering -userInputOverrides $userInputOverrides -userInputDefaultOverrides $cachedStarterModuleConfig -treatEmptyDefaultAsValid $true -autoApprove:$autoApprove.IsPresent # Getting subscription ids Import-SubscriptionData -starterModuleConfiguration $starterModuleConfiguration -bootstrapConfiguration $bootstrapConfiguration