UNPKG

@studion/infra-code-blocks

Version:
73 lines 3.87 kB
import * as pulumi from '@pulumi/pulumi'; import * as aws from '@pulumi/aws'; import { AcmCertificate } from '../acm-certificate'; import { EcsService } from '../ecs-service'; import { WebServerLoadBalancer } from './load-balancer'; import { OtelCollector } from '../../otel'; export declare namespace WebServer { type Container = Pick<EcsService.Container, 'image' | 'environment' | 'secrets' | 'mountPoints'> & { port: pulumi.Input<number>; }; type EcsConfig = Pick<EcsService.Args, 'cluster' | 'vpc' | 'volumes' | 'name' | 'deploymentController' | 'desiredCount' | 'autoscaling' | 'family' | 'size' | 'logGroupNamePrefix' | 'taskExecutionRoleInlinePolicies' | 'taskRoleInlinePolicies' | 'tags'>; type LoadBalancerConfig = Pick<WebServerLoadBalancer.Args, 'healthCheckPath' | 'healthCheckConfig' | 'loadBalancingAlgorithmType'>; type InitContainer = Omit<EcsService.Container, 'essential'>; type SidecarContainer = Omit<EcsService.Container, 'essential' | 'healthCheck'> & Required<Pick<EcsService.Container, 'healthCheck'>>; type Args = EcsConfig & Container & LoadBalancerConfig & { /** * Domain name for the ALB endpoint. Implies creation of certificate * and alias record. Must belong to the provided hosted zone. * Providing the `certificate` argument has following effects: * - Certificate creation is skipped * - Provided certificate must cover the domain name * Responsibility to ensure mentioned requirements in on the consumer, and * failing to do so will result in unexpected behavior. */ domain?: pulumi.Input<string>; /** * Certificate for the ALB HTTPS listener. Domain and alternative domains * are automatically pulled from the certificate and translated into alias * records. Domains covered by the certificate, must belong to the provided * hosted zone. In a case of wildcard certificate the `domain` argument * is required. * Providing the `domain` argument has following effects: * - Alias records creation, from automatically pulled domains, is skipped * - Certificate must cover the provided domain name * Responsibility to ensure mentioned requirements in on the consumer, and * failing to do so will result in unexpected behavior. */ certificate?: pulumi.Input<aws.acm.Certificate>; /** * ID of hosted zone is needed when the `domain` or the `certificate` * arguments are provided. */ hostedZoneId?: pulumi.Input<string>; initContainers?: pulumi.Input<pulumi.Input<WebServer.InitContainer>[]>; sidecarContainers?: pulumi.Input<pulumi.Input<WebServer.SidecarContainer>[]>; otelCollector?: pulumi.Input<OtelCollector>; }; } export declare class WebServer extends pulumi.ComponentResource { name: string; container: WebServer.Container; ecsConfig: WebServer.EcsConfig; service: pulumi.Output<EcsService>; serviceSecurityGroup: aws.ec2.SecurityGroup; lb: WebServerLoadBalancer; initContainers?: pulumi.Output<EcsService.Container[]>; sidecarContainers?: pulumi.Output<EcsService.Container[]>; volumes?: pulumi.Output<EcsService.PersistentStorageVolume[]>; acmCertificate?: AcmCertificate; dnsRecords?: pulumi.Output<aws.route53.Record[]>; constructor(name: string, args: WebServer.Args, opts?: pulumi.ComponentResourceOptions); private getVolumes; private getInitContainers; private getSidecarContainers; private getTaskRoleInlinePolicies; private createEcsConfig; private createWebServerContainer; private createTlsCertificate; private createSecurityGroup; private createEcsService; private createDnsRecords; } //# sourceMappingURL=index.d.ts.map