@fntio/infra-client
Version:
Self-hosted AWS access portal: credential vending, target-account trust, and grant-driven private networking as CDK stacks and constructs.
31 lines (30 loc) • 1.68 kB
TypeScript
import { Construct } from "constructs";
import * as ec2 from "aws-cdk-lib/aws-ec2";
import * as iam from "aws-cdk-lib/aws-iam";
import { AppFunction } from "./app-function";
export interface TailnetResolverProps {
/** The hub's SET-ONCE product prefix (hub.resourcePrefix) — the well-known
* function name derives from it. */
readonly resourcePrefix: string;
/** Site this VPC belongs to — part of the function name, because one account
* may host connector VPCs in TWO sites and each has its own DNS view. */
readonly site: string;
/** VPC whose private zones the catalog's dnsNames live in — the fn runs
* inside it, so names resolve exactly as a workload there sees them. */
readonly vpc: ec2.IVpc;
/** The hub's reconciler role (`hub.aclReconcilerPrincipal()`). Omit when
* the reconciler is same-account — identity policy alone suffices. */
readonly trustedInvoker?: iam.IPrincipal;
/** The connector VPC's name (config `connectorVpcs[].name`) — suffixes the
* function name so an account's second VPC in the same site gets its own. */
readonly name?: string;
}
/** In-VPC DNS for the hub's ACL reconciler: a Fargate task's IP moves on every
* restart and only this VPC's resolver knows the current one — cross-account,
* the reconciler can't see private zones at all, so drift-healing asks this fn
* (names in, IPs out; DNS needs no internet path, so public subnets suffice —
* same placement as the connector). */
export declare class TailnetResolver extends Construct {
readonly fn: AppFunction;
constructor(scope: Construct, id: string, props: TailnetResolverProps);
}