Skip to content

Commit c76a30e

Browse files
CopilotdjslyCopilot
authored
ci: add --min-tls-version TLS1_2 to storage account creation in VHD build scripts (#8210)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: djsly <4981802+djsly@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 78c6457 commit c76a30e

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

vhdbuilder/packer/produce-packer-settings-functions.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,8 @@ function create_windows_storage_account() {
163163
--sku "Standard_RAGRS" \
164164
--tags "now=${CREATE_TIME}" \
165165
--allow-shared-key-access false \
166-
--location ""${AZURE_LOCATION}""
166+
--min-tls-version TLS1_2 \
167+
--location "${AZURE_LOCATION}"
167168
echo "creating new container system"
168169
az storage container create --name system "--account-name=${STORAGE_ACCOUNT_NAME}" --auth-mode login
169170
else

vhdbuilder/prefetch/scripts/optimize.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,9 @@ convert_specialized_sig_version_to_managed_image() {
253253

254254
create_temp_storage() {
255255
storage_account_name="${VHD_NAME//./}"
256-
if [ -z "$(az storage account show --account-name "${storage_account_name}" | jq -r '.name')" ]; then
256+
if ! az storage account show --account-name "${storage_account_name}" >/dev/null 2>&1; then
257257
echo "creating temporary storage account ${storage_account_name} in resource group ${IMAGE_BUILDER_RG_NAME} in location ${LOCATION}"
258-
az storage account create -n "${storage_account_name}" -g "${IMAGE_BUILDER_RG_NAME}" --sku "Standard_RAGRS" --allow-shared-key-access false --location "${LOCATION}" || return $?
258+
az storage account create -n "${storage_account_name}" -g "${IMAGE_BUILDER_RG_NAME}" --sku "Standard_RAGRS" --allow-shared-key-access false --min-tls-version TLS1_2 --location "${LOCATION}" || return $?
259259
fi
260260
storage_container_name="vhd"
261261
if [ "$(az storage container exists -n "${storage_container_name}" --account-name "${storage_account_name}" --auth-mode login | jq -r '.exists')" = "false" ]; then

0 commit comments

Comments
 (0)