diff --git a/psmodules/Deploy-GuardrailsSolutionAccelerator.zip b/psmodules/Deploy-GuardrailsSolutionAccelerator.zip new file mode 100644 index 00000000..f8233bea Binary files /dev/null and b/psmodules/Deploy-GuardrailsSolutionAccelerator.zip differ diff --git a/src/GuardrailsSolutionAcceleratorSetup/modules/Deploy-GuardrailsSolutionAccelerator/Deploy-GuardrailsSolutionAccelerator.psd1 b/src/GuardrailsSolutionAcceleratorSetup/modules/Deploy-GuardrailsSolutionAccelerator/Deploy-GuardrailsSolutionAccelerator.psd1 index cfd957ef..417410e6 100644 --- a/src/GuardrailsSolutionAcceleratorSetup/modules/Deploy-GuardrailsSolutionAccelerator/Deploy-GuardrailsSolutionAccelerator.psd1 +++ b/src/GuardrailsSolutionAcceleratorSetup/modules/Deploy-GuardrailsSolutionAccelerator/Deploy-GuardrailsSolutionAccelerator.psd1 @@ -14,7 +14,7 @@ RootModule = 'Deploy-GuardrailsSolutionAccelerator' # Version number of this module. -ModuleVersion = '1.0.12' +ModuleVersion = '1.0.13' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/src/GuardrailsSolutionAcceleratorSetup/modules/Deploy-GuardrailsSolutionAccelerator/Deploy-GuardrailsSolutionAccelerator.psm1 b/src/GuardrailsSolutionAcceleratorSetup/modules/Deploy-GuardrailsSolutionAccelerator/Deploy-GuardrailsSolutionAccelerator.psm1 index cb6daee9..e4fc0889 100644 --- a/src/GuardrailsSolutionAcceleratorSetup/modules/Deploy-GuardrailsSolutionAccelerator/Deploy-GuardrailsSolutionAccelerator.psm1 +++ b/src/GuardrailsSolutionAcceleratorSetup/modules/Deploy-GuardrailsSolutionAccelerator/Deploy-GuardrailsSolutionAccelerator.psm1 @@ -1,4 +1,3 @@ - # import sub-modules Import-Module ((Split-Path $PSScriptRoot -Parent) + "\Confirm-GSAConfigurationParameters\Confirm-GSAConfigurationParameters.psd1") Import-Module ((Split-Path $PSScriptRoot -Parent) + "\Confirm-GSAPrerequisites\Confirm-GSAPrerequisites.psd1") @@ -136,6 +135,7 @@ Function Deploy-GuardrailsSolutionAccelerator { #> [CmdletBinding(DefaultParameterSetName = 'newDeployment-configFilePath')] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')] param ( # path to the configuration file - for new deployments [Parameter(mandatory = $true, ParameterSetName = 'newDeployment-configFilePath')] @@ -433,8 +433,10 @@ Function Deploy-GuardrailsSolutionAccelerator { 'deployerAzureID' = $config['runtime']['userId'] } - $secretValue = (ConvertTo-SecureString -String (ConvertTo-Json $config -Depth 10) -AsPlainText -Force) - Set-AzKeyVaultSecret -VaultName $config['runtime']['keyVaultName'] -Name $configSecretName -SecretValue $secretValue -Tag $secretTags -ContentType 'application/json' -Verbose:$useVerbose | Out-Null + $secureConfig = (ConvertTo-SecureString -String (ConvertTo-Json $config -Depth 10) -AsPlainText -Force) + $encryptedConfig = $secureConfig | ConvertFrom-SecureString + $secureConfig.Dispose() + Set-AzKeyVaultSecret -VaultName $config['runtime']['keyVaultName'] -Name $configSecretName -SecretValue ($encryptedConfig | ConvertTo-SecureString) -Tag $secretTags -ContentType 'application/json' -Verbose:$useVerbose | Out-Null Write-Host "Completed deployment of the Guardrails Solution Accelerator!" -ForegroundColor Green } @@ -459,5 +461,4 @@ $functionsToExport = @( #'Update-GSAGuardrailPSModules' #'Update-GSAWorkbookDefintion ) - Export-ModuleMember -Function $functionsToExport