diff --git a/helpers/GenerateResourcesAndImage.ps1 b/helpers/GenerateResourcesAndImage.ps1 index de68ddfe4..d023e1039 100644 --- a/helpers/GenerateResourcesAndImage.ps1 +++ b/helpers/GenerateResourcesAndImage.ps1 @@ -123,7 +123,9 @@ Function GenerateResourcesAndImage { [Parameter(Mandatory = $False)] [Switch] $Force, [Parameter(Mandatory = $False)] - [bool] $AllowBlobPublicAccess = $False + [bool] $AllowBlobPublicAccess = $False, + [Parameter(Mandatory = $False)] + [bool] $EnableHttpsTrafficOnly = $False ) $builderScriptPath = Get-PackerTemplatePath -RepositoryRoot $ImageGenerationRepositoryRoot -ImageType $ImageType @@ -191,7 +193,7 @@ Function GenerateResourcesAndImage { $storageAccountName = $storageAccountName.Replace("-", "").Replace("_", "").Replace("(", "").Replace(")", "").ToLower() $storageAccountName += "001" - New-AzStorageAccount -ResourceGroupName $ResourceGroupName -AccountName $storageAccountName -Location $AzureLocation -SkuName "Standard_LRS" -AllowBlobPublicAccess $AllowBlobPublicAccess + New-AzStorageAccount -ResourceGroupName $ResourceGroupName -AccountName $storageAccountName -Location $AzureLocation -SkuName "Standard_LRS" -AllowBlobPublicAccess $AllowBlobPublicAccess -EnableHttpsTrafficOnly $EnableHttpsTrafficOnly if ([string]::IsNullOrEmpty($AzureClientId)) { # Interactive authentication: A service principal is created during runtime. @@ -266,4 +268,4 @@ Function GenerateResourcesAndImage { -var "install_password=$($InstallPassword)" ` -var "allowed_inbound_ip_addresses=$($AgentIp)" ` $builderScriptPath -} +} \ No newline at end of file