|
| 1 | +import { IVpc } from "aws-cdk-lib/aws-ec2"; |
| 2 | +import { IRole } from "aws-cdk-lib/aws-iam"; |
| 3 | +import { HtsgetConfig } from "htsget-lambda/lib/config"; |
| 4 | + |
| 5 | +/** |
| 6 | + * Settings related to the htsget lambda construct props. |
| 7 | + */ |
| 8 | +export interface HtsgetVpcLatticeLambdaProps { |
| 9 | + /** |
| 10 | + * The htsget-rs config options. Use this to specify any locations and htsget-rs options. |
| 11 | + * |
| 12 | + * @defaultValue undefined |
| 13 | + */ |
| 14 | + htsgetConfig?: HtsgetConfig; |
| 15 | + |
| 16 | + build: { |
| 17 | + /** |
| 18 | + * The git reference to fetch from the htsget-rs repo. |
| 19 | + * |
| 20 | + * @defaultValue "main" |
| 21 | + */ |
| 22 | + gitReference?: string; |
| 23 | + |
| 24 | + /** |
| 25 | + * Whether to force a git clone for every build. If this is false, then the git repo is only cloned once |
| 26 | + * for every git reference in a temporary directory. Otherwise, the repo is cloned every time. |
| 27 | + * |
| 28 | + * @defaultValue false |
| 29 | + */ |
| 30 | + gitForceClone?: boolean; |
| 31 | + |
| 32 | + /** |
| 33 | + * Override any cargo lambda flags for the build. By default, features are resolved automatically based on the |
| 34 | + * config and `HtsgetLocation[]`. This option overrides that and any automatically added flags. |
| 35 | + * |
| 36 | + * @defaultValue undefined |
| 37 | + */ |
| 38 | + cargoLambdaFlags?: string[]; |
| 39 | + |
| 40 | + /** |
| 41 | + * Override the environment variables used to build htsget. Note that this only adds environment variables that |
| 42 | + * get used to build htsget-rs with `cargo`. It has no effect on the environment variables that htsget-rs has when |
| 43 | + * the Lambda function is deployed. In general, leave this undefined unless there is a specific reason to override |
| 44 | + * the build environment. |
| 45 | + * |
| 46 | + * @defaultValue undefined |
| 47 | + */ |
| 48 | + buildEnvironment?: Record<string, string>; |
| 49 | + }; |
| 50 | + |
| 51 | + /** |
| 52 | + * How to name the VPC Lattice service. |
| 53 | + */ |
| 54 | + naming: { |
| 55 | + /** |
| 56 | + * The domain name for the htsget server. This assumes |
| 57 | + * that a `HostedZone` exists for this domain. |
| 58 | + */ |
| 59 | + domain: string; |
| 60 | + |
| 61 | + /** |
| 62 | + * The domain name prefix to use for the htsget-rs server. |
| 63 | + */ |
| 64 | + subDomain: string; |
| 65 | + |
| 66 | + /** |
| 67 | + * The certificate ARN for SSL corresponding to a wildcard or specific cert for the sub.domain |
| 68 | + */ |
| 69 | + certificateArn: string; |
| 70 | + }; |
| 71 | + |
| 72 | + /** |
| 73 | + * Specify a VPC for the Lambda function, or specify the name of the VPC to lookup. |
| 74 | + */ |
| 75 | + vpcOrName: string | IVpc; |
| 76 | + |
| 77 | + /** |
| 78 | + * Use the provided role instead of creating one. This will ignore any configuration related to permissions for |
| 79 | + * buckets and secrets, and rely on the existing role. |
| 80 | + * |
| 81 | + * @defaultValue undefined |
| 82 | + */ |
| 83 | + role?: IRole; |
| 84 | + |
| 85 | + /** |
| 86 | + * A list of AWS account ids that the VPC Lattice service will be shared to using RAM. |
| 87 | + */ |
| 88 | + destinationAccounts: string[]; |
| 89 | +} |
0 commit comments