feat(aws-iam-rotation): address PR comments

This commit is contained in:
carlosmonastyrski
2025-04-25 11:01:35 -03:00
parent 5819b8c576
commit 57c96abe03
10 changed files with 111 additions and 64 deletions
@@ -35,12 +35,7 @@ export const AwsIamUserSecretRotationParametersFields = () => {
helperText={
<Tooltip
className="max-w-md"
content={
<>
Ensure that your connection has the correct permissions and the IAM user exists
in the connection&#39;s audience.
</>
}
content={<>Ensure that your connection has the correct permissions.</>}
>
<div>
<span>Don&#39;t see the IAM user you&#39;re looking for?</span>{" "}
@@ -73,8 +68,13 @@ export const AwsIamUserSecretRotationParametersFields = () => {
control={control}
name="parameters.region"
render={({ field: { value, onChange }, fieldState: { error } }) => (
<FormControl isError={Boolean(error)} errorText={error?.message} label="Region">
<AwsRegionSelect value={value} onChange={onChange} />
<FormControl
isError={Boolean(error)}
errorText={error?.message}
label="Region"
helperText="Required only if no global scope is set."
>
<AwsRegionSelect value={value ?? ""} onChange={onChange} />
</FormControl>
)}
/>
@@ -8,7 +8,7 @@ export const AwsIamUserSecretRotationSchema = z
type: z.literal(SecretRotation.AwsIamUserSecret),
parameters: z.object({
userName: z.string().trim().min(1, "User Name required"),
region: z.string().trim().min(1, "Region required")
region: z.string().trim().optional()
}),
secretsMapping: z.object({
accessKeyId: z.string().trim().min(1, "Access Key ID required"),
+1 -1
View File
@@ -23,7 +23,7 @@ export const SECRET_ROTATION_MAP: Record<
[SecretRotation.AwsIamUserSecret]: {
name: "AWS IAM User Secret",
image: "Amazon Web Services.png",
size: 35
size: 50
}
};
@@ -8,7 +8,7 @@ import {
export type TAwsIamUserSecretRotation = TSecretRotationV2Base & {
type: SecretRotation.AwsIamUserSecret;
parameters: {
region: string;
region?: string;
userName: string;
};
secretsMapping: {