@@ -12,14 +12,15 @@ import {
1212 PageContainer ,
1313} from "~/components/layout/AppLayout" ;
1414import { Button , LinkButton } from "~/components/primitives/Buttons" ;
15+ import { ClipboardField } from "~/components/primitives/ClipboardField" ;
1516import { Fieldset } from "~/components/primitives/Fieldset" ;
1617import { FormButtons } from "~/components/primitives/FormButtons" ;
1718import { FormError } from "~/components/primitives/FormError" ;
1819import { Header2 , Header3 } from "~/components/primitives/Headers" ;
1920import { Input } from "~/components/primitives/Input" ;
2021import { InputGroup } from "~/components/primitives/InputGroup" ;
2122import { Label } from "~/components/primitives/Label" ;
22- import { NavBar , PageTitle } from "~/components/primitives/PageHeader" ;
23+ import { NavBar , PageAccessories , PageTitle } from "~/components/primitives/PageHeader" ;
2324import { Paragraph } from "~/components/primitives/Paragraph" ;
2425import { Select , SelectItem } from "~/components/primitives/Select" ;
2526import { prisma } from "~/db.server" ;
@@ -36,11 +37,14 @@ import {
3637} from "~/services/platform.v3.server" ;
3738import { requireUserId } from "~/services/session.server" ;
3839import {
40+ docsPath ,
3941 OrganizationParamsSchema ,
4042 organizationPath ,
4143 v3PrivateConnectionsPath ,
4244} from "~/utils/pathBuilder" ;
4345import {
46+ ArrowTopRightOnSquareIcon ,
47+ BookOpenIcon ,
4448 CommandLineIcon ,
4549 DocumentTextIcon ,
4650 PencilSquareIcon ,
@@ -531,7 +535,7 @@ export default function Page() {
531535 const { availableRegions, activeRegions, awsAccountIds } = useTypedLoaderData < typeof loader > ( ) ;
532536 const { organizationSlug } = useParams ( ) ;
533537 const lastSubmission = useActionData ( ) ;
534- const [ setupMethod , setSetupMethod ] = useState < SetupMethod | null > ( null ) ;
538+ const [ setupMethod , setSetupMethod ] = useState < SetupMethod | null > ( "manual" ) ;
535539
536540 const defaultRegion = "us-east-1" ;
537541
@@ -547,6 +551,15 @@ export default function Page() {
547551 < PageContainer >
548552 < NavBar >
549553 < PageTitle title = "Add Private Connection" backButton = { { to : v3PrivateConnectionsPath ( { slug : organizationSlug ! } ) , text : "Private Connections" } } />
554+ < PageAccessories >
555+ < LinkButton
556+ variant = "docs/small"
557+ LeadingIcon = { BookOpenIcon }
558+ to = { docsPath ( "private-networking/overview" ) }
559+ >
560+ Private connection docs
561+ </ LinkButton >
562+ </ PageAccessories >
550563 </ NavBar >
551564 < PageBody scrollable = { true } >
552565 < MainHorizontallyCenteredContainer className = "max-w-3xl" >
@@ -651,45 +664,55 @@ export default function Page() {
651664 </ div >
652665 ) }
653666
654- { /* Docs iframe */ }
667+ { /* Docs link */ }
655668 { setupMethod === "docs" && (
656669 < div className = "mb-6 rounded-lg border border-grid-dimmed p-4" >
657670 < Header3 spacing > Setup Guide</ Header3 >
658671 { awsAccountIds . length > 0 && (
659672 < >
660673 < Paragraph variant = "small" className = "mb-3" >
661674 When adding allowed principals to your VPC Endpoint Service, use the following
662- AWS account ID (s):
675+ AWS account ARN (s):
663676 </ Paragraph >
664- < div className = "mb-4 rounded-md border border-charcoal-700 bg-charcoal-900 p-3 " >
677+ < div className = "mb-4 space-y-2 " >
665678 { awsAccountIds . map ( ( id ) => (
666- < code key = { id } className = "text-sm text-emerald-400" >
667- { id }
668- </ code >
679+ < ClipboardField
680+ key = { id }
681+ value = { `arn:aws:iam::${ id } :root` }
682+ variant = "primary/medium"
683+ />
669684 ) ) }
670685 </ div >
671686 </ >
672687 ) }
673- < iframe
674- src = "https://trigger.dev/docs/network/private-link-setup-guide"
675- title = "Private Link Setup Guide"
676- className = "h-[600px] w-full rounded-md border border-charcoal-700"
677- />
688+ < Paragraph variant = "small" className = "mb-3" >
689+ Follow the step-by-step guide in our docs to create a VPC Endpoint Service in the
690+ AWS Console, then come back here to add the connection.
691+ </ Paragraph >
692+ < LinkButton
693+ to = { docsPath ( "private-networking/aws-console-setup" ) }
694+ variant = "primary/medium"
695+ TrailingIcon = { ArrowTopRightOnSquareIcon }
696+ >
697+ Open setup guide
698+ </ LinkButton >
678699 </ div >
679700 ) }
680701
681- { /* AWS account IDs reference */ }
682- { setupMethod === "manual" && (
702+ { /* AWS account ARNs reference */ }
703+ { setupMethod === "manual" && awsAccountIds . length > 0 && (
683704 < div className = "mb-6 rounded-lg border border-grid-dimmed p-4" >
684- < Paragraph variant = "small" className = "mb-2 " >
685- Add the following AWS account ID (s) to your VPC Endpoint Service's allowed
705+ < Paragraph variant = "small" className = "mb-3 " >
706+ Add the following AWS account ARN (s) to your VPC Endpoint Service's allowed
686707 principals:
687708 </ Paragraph >
688- < div className = "rounded-md border border-charcoal-700 bg-charcoal-900 p-3 " >
709+ < div className = "space-y-2 " >
689710 { awsAccountIds . map ( ( id ) => (
690- < code key = { id } className = "text-sm text-emerald-400" >
691- { id }
692- </ code >
711+ < ClipboardField
712+ key = { id }
713+ value = { `arn:aws:iam::${ id } :root` }
714+ variant = "primary/medium"
715+ />
693716 ) ) }
694717 </ div >
695718 </ div >
0 commit comments