UNPKG

@fntio/infra-client

Version:

Self-hosted AWS access portal: credential vending, target-account trust, and grant-driven private networking as CDK stacks and constructs.

30 lines (29 loc) • 1.57 kB
import { Construct } from "constructs"; import * as ec2 from "aws-cdk-lib/aws-ec2"; import * as lambda from "aws-cdk-lib/aws-lambda"; export interface TailnetConnectorProps { /** The VPC whose private resources this connector makes reachable. */ readonly vpc: ec2.IVpc; /** Headscale control plane, e.g. https://headscale.access.example.com */ readonly controlUrl: string; /** CIDRs advertised into the tailnet (usually the VPC CIDR). */ readonly routes: string[]; /** Device name shown in the tailnet. Default: "connector". */ readonly hostname?: string; /** Self-auth at boot (single-use key, no stored secret). Cross-account: * `hub.connectorKeyMinter(...)` + the hub's grantConnectorAccount — its ARN * carries the hub region the mint step addresses. */ readonly minter: lambda.IFunction; /** Container Insights on the connector cluster (Security Hub ECS.12); * per-metric cost. Default false. */ readonly containerInsights?: boolean; /** Run the connector from a copy of the Tailscale image in this account's own registry, made at * deploy, so a restart never depends on the public registry. Default false. */ readonly mirrorImages?: boolean; } /** In-VPC subnet router, one per VPC; dials OUT only. Grants decide who may * route here — the resource's SG still decides what the VPC accepts. */ export declare class TailnetConnector extends Construct { readonly securityGroup: ec2.SecurityGroup; constructor(scope: Construct, id: string, props: TailnetConnectorProps); }