fix(ui): restore alibabacloud credential validation in form schema

The alibabacloud branch was accidentally dropped from the credentials
ternary chain when image and openstack providers were added.
This commit is contained in:
Andoni A.
2026-02-24 12:45:46 +01:00
parent 4443fa231a
commit ea96ad0fd8
+12 -1
View File
@@ -287,7 +287,18 @@ export const addCredentialsFormSchema = (
[ProviderCredentialFields.OPENSTACK_CLOUDS_YAML_CLOUD]:
z.string().min(1, "Cloud name is required"),
}
: {}),
: providerType === "alibabacloud"
? {
[ProviderCredentialFields.ALIBABACLOUD_ACCESS_KEY_ID]:
z
.string()
.min(1, "Access Key ID is required"),
[ProviderCredentialFields.ALIBABACLOUD_ACCESS_KEY_SECRET]:
z
.string()
.min(1, "Access Key Secret is required"),
}
: {}),
})
.superRefine((data: Record<string, string | undefined>, ctx) => {
if (providerType === "m365") {