mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 12:38:36 +00:00
31 lines
1.2 KiB
TypeScript
31 lines
1.2 KiB
TypeScript
import { useFormContext } from "react-hook-form";
|
|
|
|
import { TSecretRotationV2Form } from "@app/components/secret-rotations-v2/forms/schemas";
|
|
import { GenericFieldLabel } from "@app/components/v2";
|
|
import { SecretRotation } from "@app/hooks/api/secretRotationsV2";
|
|
|
|
import { SecretRotationReviewSection } from "./shared";
|
|
|
|
export const AwsIamUserSecretRotationReviewFields = () => {
|
|
const { watch } = useFormContext<
|
|
TSecretRotationV2Form & {
|
|
type: SecretRotation.AwsIamUserSecret;
|
|
}
|
|
>();
|
|
|
|
const [parameters, { accessKeyId, secretAccessKey }] = watch(["parameters", "secretsMapping"]);
|
|
|
|
return (
|
|
<>
|
|
<SecretRotationReviewSection label="Parameters">
|
|
<GenericFieldLabel label="Region">{parameters.region}</GenericFieldLabel>
|
|
<GenericFieldLabel label="User Name">{parameters.userName}</GenericFieldLabel>
|
|
</SecretRotationReviewSection>
|
|
<SecretRotationReviewSection label="Secrets Mapping">
|
|
<GenericFieldLabel label="Secret Access Key ID">{accessKeyId}</GenericFieldLabel>
|
|
<GenericFieldLabel label="Secret Access Key">{secretAccessKey}</GenericFieldLabel>
|
|
</SecretRotationReviewSection>
|
|
</>
|
|
);
|
|
};
|