Skip to content

Commit 34fbb20

Browse files
avivturcursoragent
andauthored
Fix EC2 provider settings keys for target-az and target-region (#2396)
The UI was sending camelCase keys (targetAz, targetRegion) in the provider spec.settings, but the backend expects kebab-case keys (target-az, target-region). This caused migration plans to fail with "provider spec.settings.target-az is not configured" error when creating EBS volumes from snapshots. Resolves: MTV-5256 Signed-off-by: Aviv Turgeman <aturgema@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 5f45f6d commit 34fbb20

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/providers/create/utils/buildEc2ProviderResources.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ export const buildEc2ProviderResources = (formData: Ec2FormData): ProviderResour
4141
provider.spec.settings = {
4242
ec2Region: ec2Region.trim(),
4343
...(autoTargetCredentials && { autoTargetCredentials: 'true' }),
44-
...(!autoTargetCredentials && targetAz?.trim() && { targetAz: targetAz.trim() }),
45-
...(!autoTargetCredentials && targetRegion?.trim() && { targetRegion: targetRegion.trim() }),
44+
...(!autoTargetCredentials && targetAz?.trim() && { 'target-az': targetAz.trim() }),
45+
...(!autoTargetCredentials &&
46+
targetRegion?.trim() && { 'target-region': targetRegion.trim() }),
4647
};
4748
}
4849

0 commit comments

Comments
 (0)