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.
This commit is contained in:
Gianluca Zuccarelli 2025-08-21 12:48:00 +01:00 committed by Sanne Raymaekers
parent 3a83a14720
commit 859b7cace8

View file

@ -211,8 +211,9 @@ function commonRequestToState(
snapshot_date = ''; snapshot_date = '';
} }
// we need to check for the region for on-prem
const awsUploadOptions = aws?.upload_request const awsUploadOptions = aws?.upload_request
.options as AwsUploadRequestOptions; .options as AwsUploadRequestOptions & { region?: string | undefined };
const gcpUploadOptions = gcp?.upload_request const gcpUploadOptions = gcp?.upload_request
.options as GcpUploadRequestOptions; .options as GcpUploadRequestOptions;
const azureUploadOptions = azure?.upload_request const azureUploadOptions = azure?.upload_request
@ -315,6 +316,7 @@ function commonRequestToState(
: 'manual') as AwsShareMethod, : 'manual') as AwsShareMethod,
source: { id: awsUploadOptions?.share_with_sources?.[0] }, source: { id: awsUploadOptions?.share_with_sources?.[0] },
sourceId: awsUploadOptions?.share_with_sources?.[0], sourceId: awsUploadOptions?.share_with_sources?.[0],
region: awsUploadOptions?.region,
}, },
snapshotting: { snapshotting: {
useLatest: !snapshot_date && !request.image_requests[0]?.content_template, useLatest: !snapshot_date && !request.image_requests[0]?.content_template,