Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 24 additions & 9 deletions libs/domains/clusters/feature/src/lib/gcp-kms-key/gke-kms-key.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Controller, useFormContext } from 'react-hook-form'
import { type ClusterGeneralData } from '@qovery/shared/interfaces'
import { ExternalLink, Icon, InputText, InputToggle, Tooltip } from '@qovery/shared/ui'
import { Callout, ExternalLink, Icon, InputText, InputToggle, Tooltip } from '@qovery/shared/ui'

export interface GkeKmsKeyProps {
fromDetail?: boolean
Expand Down Expand Up @@ -82,14 +82,29 @@ export function GkeKmsKey({ fromDetail }: GkeKmsKeyProps) {
},
}}
render={({ field, fieldState: { error } }) => (
<InputText
name={field.name}
onChange={field.onChange}
value={(field.value as string) ?? ''}
label="KMS Key"
placeholder="projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{key}"
error={error?.message}
/>
<>
<InputText
name={field.name}
onChange={field.onChange}
value={(field.value as string) ?? ''}
label="KMS Key"
placeholder="projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{key}"
error={error?.message}
/>
<Callout.Root color="yellow">
<Callout.Icon>
<Icon iconName="warning" iconStyle="regular" />
</Callout.Icon>
<Callout.Text>
<Callout.TextDescription>
The KMS key must be <strong>in the same region as your GKE cluster</strong> <br />
<strong>Never delete the KMS key associated with your cluster</strong> - doing so will permanently
and irrecoverably destroy all encrypted data, including node disks, persistent volumes, and
Kubernetes secrets.
</Callout.TextDescription>
</Callout.Text>
</Callout.Root>
</>
)}
/>
)}
Expand Down
Loading