File tree 2 files changed +14
-2
lines changed
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,11 @@ function Convert-HCLVariablesToUserInputConfig {
58
58
$inputType = " AzureSubscriptionIds"
59
59
}
60
60
61
+ $sensitive = $false
62
+ if ($variable.Value [0 ].PSObject.Properties.Name -contains " sensitive" ) {
63
+ $sensitive = $true
64
+ }
65
+
61
66
$dataType = $variable.Value [0 ].type
62
67
$dataType = $dataType.Replace (" `$ {" , " " ).Replace(" }" , " " )
63
68
@@ -66,6 +71,7 @@ function Convert-HCLVariablesToUserInputConfig {
66
71
$starterModuleConfigurationInstance | Add-Member - NotePropertyName " Type" - NotePropertyValue $inputType
67
72
$starterModuleConfigurationInstance | Add-Member - NotePropertyName " Value" - NotePropertyValue " "
68
73
$starterModuleConfigurationInstance | Add-Member - NotePropertyName " DataType" - NotePropertyValue $dataType
74
+ $starterModuleConfigurationInstance | Add-Member - NotePropertyName " Sensitive" - NotePropertyValue $sensitive
69
75
70
76
if ($variable.Value [0 ].PSObject.Properties.Name -contains " default" ) {
71
77
$defaultValue = $variable.Value [0 ].default
@@ -84,6 +90,8 @@ function Convert-HCLVariablesToUserInputConfig {
84
90
$starterModuleConfigurationInstance | Add-Member - NotePropertyName " DefaultValue" - NotePropertyValue $defaultValue
85
91
}
86
92
93
+
94
+
87
95
if ($hasValidation ) {
88
96
$validator = $validators.PSObject.Properties [$validationType ].Value
89
97
$description = " $description ($ ( $validator.Description ) )"
Original file line number Diff line number Diff line change @@ -42,7 +42,11 @@ function Request-ConfigurationValue {
42
42
Write-InformationColored " : " - NoNewline - InformationAction Continue
43
43
}
44
44
45
- $readValue = Read-Host
45
+ if ($configValue.Sensitive ) {
46
+ $readValue = Read-Host - MaskInput
47
+ } else {
48
+ $readValue = Read-Host
49
+ }
46
50
47
51
$previousValue = $configValue.Value
48
52
@@ -55,7 +59,7 @@ function Request-ConfigurationValue {
55
59
$hasNotSpecifiedValue = ($null -eq $configValue.Value -or " " -eq $configValue.Value ) -and ($configValue.Value -ne $configValue.DefaultValue )
56
60
$isDisallowedValue = $hasAllowedValues -and $allowedValues.Contains ($configValue.Value ) -eq $false
57
61
$skipValidationForEmptyDefault = $treatEmptyDefaultAsValid -and $hasDefaultValue -and $defaultValue -eq " " -and $configValue.Value -eq " "
58
-
62
+
59
63
if ($skipValidationForEmptyDefault ) {
60
64
$isNotValid = $false
61
65
} else {
You can’t perform that action at this time.
0 commit comments