@studion/infra-code-blocks
Version:
Studion common infra components
38 lines (37 loc) • 1.58 kB
TypeScript
import * as pulumi from '@pulumi/pulumi';
import * as aws from '@pulumi/aws';
import { AcmCertificate } from './acm-certificate';
import { EcsService, EcsServiceArgs } from './ecs-service';
export type WebServerArgs = Pick<EcsServiceArgs, 'image' | 'port' | 'clusterId' | 'clusterName' | 'vpcId' | 'vpcCidrBlock' | 'desiredCount' | 'autoscaling' | 'size' | 'environment' | 'secrets' | 'persistentStorageConfig' | 'taskExecutionRoleInlinePolicies' | 'taskRoleInlinePolicies' | 'tags'> & {
publicSubnetIds: pulumi.Input<pulumi.Input<string>[]>;
/**
* The domain which will be used to access the service.
* The domain or subdomain must belong to the provided hostedZone.
*/
domain?: pulumi.Input<string>;
/**
* The ID of the hosted zone.
*/
hostedZoneId?: pulumi.Input<string>;
/**
* Path for the health check request. Defaults to "/healthcheck".
*/
healthCheckPath?: pulumi.Input<string>;
};
export declare class WebServer extends pulumi.ComponentResource {
name: string;
service: EcsService;
lbSecurityGroup: aws.ec2.SecurityGroup;
serviceSecurityGroup: aws.ec2.SecurityGroup;
lb: aws.lb.LoadBalancer;
lbTargetGroup: aws.lb.TargetGroup;
lbHttpListener: aws.lb.Listener;
certificate?: AcmCertificate;
lbTlsListener?: aws.lb.Listener;
constructor(name: string, args: WebServerArgs, opts?: pulumi.ComponentResourceOptions);
private createTlsCertificate;
private createLoadBalancer;
private createSecurityGroup;
private createEcsService;
private createDnsRecord;
}