Skip to content

Commit

Permalink
bug: fix missing auto approve flag (#97)
Browse files Browse the repository at this point in the history
# 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.
  • Loading branch information
jaredfholgate authored Jan 10, 2024
1 parent 32fa776 commit ec2a8bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ALZ/Private/New-ALZEnvironmentTerraform.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit ec2a8bf

Please sign in to comment.