import { Construct } from 'constructs'; import { RemovalPolicy } from 'aws-cdk-lib'; import { HostedZoneProps, IHostedZone } from 'aws-cdk-lib/aws-route53'; import { CertificateProps, ICertificate } from 'aws-cdk-lib/aws-certificatemanager'; export interface CoreConstructProps extends Partial>, Partial> { /** * The url/rootDomain for the HostedZone. This is where your NS records * at your registrar point. * * @example If you are hosting the ui at `www.example.com` and the api * at `api.example.com` the rootDomain would be `example.com` This is * similar for branches, such as `dev.api.example.com` and * `dev.example.com`. The rootDomain will still be `example.com`. */ rootDomain: string; /** * When adding records to an existing HostedZone, pass in the hostedZoneId * and records for all the other stacks will get added to the targeted zone */ hostedZoneId?: string; hostedZone?: Partial; /** * Option to use an existing certificate for TLS/SSL */ certificateArn?: string; certificate?: Partial; /** * When building the certificate this will add a wildcard subDomain to * the rootDomain so that all subDomains will be able to use the * certificate. If you would like to specify which subDomains should be * included use the `props.subjectAlternativeNames` instead. When * passing in the certificateArn a certificate will not be created and * this will be ignored. */ includeStarSubdomain?: boolean; /** * Option to not use fixed logicalId's for the RestApi resource. For more * info, see [Naming](https://full-stack-pattern.matthewkeil.com/docs/naming) */ dontOverrideLogicalId?: boolean; /** * RemovalPolicy to apply to all resources. If a RemovalPolicy prop is provided * for a specific resource, ie the `props.userPool.removalPolicy`, it will * override this value */ removalPolicy?: RemovalPolicy; /** * Use certificate.subjectAlternativeNames instead * @deprecated */ subjectAlternativeNames?: string[]; } export declare class CoreConstruct extends Construct { private props; /** * Will lookup the hostedZoneId and the certificateArn for the provided * rootDomain. If a HostedZone is found for rootDomain the id is added * to props.hostedZoneId. If a Certificate is found for the rootDomain * the certificateArn is added to props.certificateArn. This makes it * easy to pass the returned props to the CoreConstruct constructor * function. * * Must provide a region to search and optionally can provide * a profile to use (uses profile/credentials in ~/.aws/credentials) for * the lookup * * @returns {Promise} */ static lookupExistingResources(props: CoreConstructProps & { region: string; profile?: string; }): Promise; hostedZone: IHostedZone; certificate: ICertificate; constructor(scope: Construct, id: string, props: CoreConstructProps); private buildHostedZone; private buildCertificate; }