Update GCP auth docs

This commit is contained in:
Tuan Dang
2024-05-08 17:03:26 -07:00
parent e99182c141
commit 2406d3d904
7 changed files with 315 additions and 183 deletions
@@ -200,6 +200,27 @@ export const IdentityGcpAuthForm = ({
return (
<form onSubmit={handleSubmit(onFormSubmit)}>
<Controller
control={control}
name="type"
render={({ field: { onChange, ...field }, fieldState: { error } }) => (
<FormControl label="Type" isError={Boolean(error)} errorText={error?.message}>
<Select
defaultValue={field.value}
{...field}
onValueChange={(e) => onChange(e)}
className="w-full"
>
<SelectItem value="iam" key="gcpiam">
GCP IAM Auth
</SelectItem>
<SelectItem value="gce" key="gcp-type-gce">
GCP GCE Auth
</SelectItem>
</Select>
</FormControl>
)}
/>
<Controller
control={control}
name="credentials"
@@ -213,28 +234,6 @@ export const IdentityGcpAuthForm = ({
</FormControl>
)}
/>
<Controller
control={control}
name="type"
render={({ field: { onChange, ...field }, fieldState: { error } }) => (
<FormControl label="Type" isError={Boolean(error)} errorText={error?.message}>
<Select
defaultValue={field.value}
{...field}
onValueChange={(e) => onChange(e)}
className="w-full"
>
<SelectItem value="iam" key="gcpiam">
IAM
</SelectItem>
<SelectItem value="gce" key="gcp-type-gce">
GCE
</SelectItem>
</Select>
</FormControl>
)}
/>
<Controller
control={control}
defaultValue="2592000"