From 859b7cace8444dff1f20794365c76d5d63091a74 Mon Sep 17 00:00:00 2001 From: Gianluca Zuccarelli Date: Thu, 21 Aug 2025 12:48:00 +0100 Subject: [PATCH] Wizard: on-prem aws region in edit The AWS region was getting reset when going into edit mode for a blueprint. This was because the request wasn't being properly mapped back to the correct state. --- src/Components/CreateImageWizard/utilities/requestMapper.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Components/CreateImageWizard/utilities/requestMapper.ts b/src/Components/CreateImageWizard/utilities/requestMapper.ts index bdb4e589..ae2ee53a 100644 --- a/src/Components/CreateImageWizard/utilities/requestMapper.ts +++ b/src/Components/CreateImageWizard/utilities/requestMapper.ts @@ -211,8 +211,9 @@ function commonRequestToState( snapshot_date = ''; } + // we need to check for the region for on-prem const awsUploadOptions = aws?.upload_request - .options as AwsUploadRequestOptions; + .options as AwsUploadRequestOptions & { region?: string | undefined }; const gcpUploadOptions = gcp?.upload_request .options as GcpUploadRequestOptions; const azureUploadOptions = azure?.upload_request @@ -315,6 +316,7 @@ function commonRequestToState( : 'manual') as AwsShareMethod, source: { id: awsUploadOptions?.share_with_sources?.[0] }, sourceId: awsUploadOptions?.share_with_sources?.[0], + region: awsUploadOptions?.region, }, snapshotting: { useLatest: !snapshot_date && !request.image_requests[0]?.content_template,