diff --git a/ui/components/providers/workflow/credentials-role-helper.tsx b/ui/components/providers/workflow/credentials-role-helper.tsx
new file mode 100644
index 0000000000..282a64e38e
--- /dev/null
+++ b/ui/components/providers/workflow/credentials-role-helper.tsx
@@ -0,0 +1,44 @@
+"use client";
+
+import { Snippet } from "@nextui-org/react";
+import Link from "next/link";
+import { useSession } from "next-auth/react";
+
+export const CredentialsRoleHelper = () => {
+ const { data: session } = useSession();
+
+ return (
+
+
+
+ A new read-only IAM role must be manually created.
+ Use one of the following templates to create the IAM role:
+
+
+
+ CloudFormation Template
+
+
+ Terraform Code
+
+
+
+ The External ID will also be required:
+
+
+
+ {session?.tenantId}
+
+
+
+
+ );
+};
diff --git a/ui/components/providers/workflow/forms/via-role/aws-role-form.tsx b/ui/components/providers/workflow/forms/via-role/aws-role-form.tsx
index 1240e20e07..318c463958 100644
--- a/ui/components/providers/workflow/forms/via-role/aws-role-form.tsx
+++ b/ui/components/providers/workflow/forms/via-role/aws-role-form.tsx
@@ -4,6 +4,8 @@ import { Control, UseFormSetValue, useWatch } from "react-hook-form";
import { CustomInput } from "@/components/ui/custom";
import { AWSCredentialsRole } from "@/types";
+import { CredentialsRoleHelper } from "../../credentials-role-helper";
+
export const AWSCredentialsRoleForm = ({
control,
setValue,
@@ -21,11 +23,11 @@ export const AWSCredentialsRoleForm = ({
return (
<>
-
+
Connect assuming IAM Role
-
+
Please provide the information for your AWS credentials.
@@ -87,6 +89,8 @@ export const AWSCredentialsRoleForm = ({
/>
>
)}
+
+
Assume Role
@@ -110,11 +114,12 @@ export const AWSCredentialsRoleForm = ({
placeholder="Enter the External ID"
variant="bordered"
defaultValue={externalId}
+ isDisabled
isRequired
isInvalid={!!control._formState.errors.external_id}
/>
-
Optional fields
+
Optional fields
{
Add a cloud account
- Follow the steps to configure your cloud account. This allows you to
- launch the first scan when the process is complete.
+ Complete the steps to configure the cloud account, enabling the launch
+ of the first scan once completed.
{
password?: boolean;
confirmPassword?: boolean;
defaultValue?: string;
+ isReadOnly?: boolean;
isRequired?: boolean;
isInvalid?: boolean;
isDisabled?: boolean;
@@ -36,6 +37,7 @@ export const CustomInput = ({
confirmPassword = false,
password = false,
defaultValue,
+ isReadOnly = false,
isRequired = true,
isInvalid,
isDisabled = false,
@@ -106,6 +108,7 @@ export const CustomInput = ({
defaultValue={defaultValue}
endContent={endContent}
isDisabled={isDisabled}
+ isReadOnly={isReadOnly}
{...field}
/>