@studion/infra-code-blocks
Version:
Studion common infra components
36 lines (35 loc) • 1.13 kB
TypeScript
import * as aws from '@pulumi/aws';
import * as pulumi from '@pulumi/pulumi';
import { AcmCertificate } from './acm-certificate';
export type StaticSiteArgs = {
/**
* The domain which will be used to access the static site.
* The domain or subdomain must belong to the provided hostedZone.
*/
domain?: pulumi.Input<string>;
/**
* The ID of the hosted zone.
*/
hostedZoneId?: pulumi.Input<string>;
/**
* ARN of the CloudFront viewer-request function.
*/
viewerRequestFunctionArn?: pulumi.Input<string>;
/**
* A map of tags to assign to the resource.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
};
export declare class StaticSite extends pulumi.ComponentResource {
name: string;
certificate?: AcmCertificate;
bucket: aws.s3.Bucket;
cloudfront: aws.cloudfront.Distribution;
constructor(name: string, args: StaticSiteArgs, opts?: pulumi.ComponentResourceOptions);
private createTlsCertificate;
private createPublicBucket;
private createCloudfrontDistribution;
private createDnsRecord;
}