1
- import * as aws from "@pulumi/aws" ;
2
1
import * as pulumi from "@pulumi/pulumi" ;
2
+ import * as aws from "@pulumi/aws" ;
3
3
4
4
import * as fs from "fs" ;
5
5
import * as mime from "mime" ;
@@ -84,7 +84,7 @@ let certificateArn: pulumi.Input<string> = config.certificateArn!;
84
84
* Only provision a certificate (and related resources) if a certificateArn is _not_ provided via configuration.
85
85
*/
86
86
if ( config . certificateArn === undefined ) {
87
-
87
+
88
88
const eastRegion = new aws . Provider ( "east" , {
89
89
region : "us-east-1" , // Per AWS, ACM certificate must be in the us-east-1 region.
90
90
} ) ;
@@ -102,18 +102,18 @@ if (config.certificateArn === undefined) {
102
102
* See https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-dns.html for more info.
103
103
*/
104
104
const certificateValidationDomain = new aws . route53 . Record ( `${ config . targetDomain } -validation` , {
105
- name : certificate . domainValidationOptions . apply ( d => d [ 0 ] . resourceRecordName ) ,
105
+ name : certificate . domainValidationOptions [ 0 ] . resourceRecordName ,
106
106
zoneId : hostedZoneId ,
107
- type : certificate . domainValidationOptions . apply ( d => d [ 0 ] . resourceRecordType ) ,
108
- records : [ certificate . domainValidationOptions . apply ( d => d [ 0 ] . resourceRecordValue ) ] ,
107
+ type : certificate . domainValidationOptions [ 0 ] . resourceRecordType ,
108
+ records : [ certificate . domainValidationOptions [ 0 ] . resourceRecordValue ] ,
109
109
ttl : tenMinutes ,
110
110
} ) ;
111
111
112
112
/**
113
- * This is a _special_ resource that waits for ACM to complete validation via the DNS record
114
- * checking for a status of "ISSUED" on the certificate itself. No actual resources are
115
- * created (or updated or deleted).
116
- *
113
+ * This is a _special_ resource that waits for ACM to complete validation via the DNS record
114
+ * checking for a status of "ISSUED" on the certificate itself. No actual resources are
115
+ * created (or updated or deleted).
116
+ *
117
117
* See https://www.terraform.io/docs/providers/aws/r/acm_certificate_validation.html for slightly more detail
118
118
* and https://github.com/terraform-providers/terraform-provider-aws/blob/master/aws/resource_aws_acm_certificate_validation.go
119
119
* for the actual implementation.
@@ -132,7 +132,7 @@ if (config.certificateArn === undefined) {
132
132
const distributionArgs : aws . cloudfront . DistributionArgs = {
133
133
enabled : true ,
134
134
// Alternate aliases the CloudFront distribution can be reached at, in addition to https://xxxx.cloudfront.net.
135
- // Required if you want to access the distribution via config.targetDomain as well.
135
+ // Required if you want to access the distribution via config.targetDomain as well.
136
136
aliases : [ config . targetDomain ] ,
137
137
138
138
// We only specify one origin for this distribution, the S3 content bucket.
@@ -248,7 +248,7 @@ const aRecord = createAliasRecord(config.targetDomain, cdn);
248
248
249
249
// Export properties from this stack. This prints them at the end of `pulumi up` and
250
250
// makes them easier to access from the pulumi.com.
251
- export const contentBucketUri = contentBucket . bucket . apply ( b => `s3://${ b } ` ) ;
251
+ export const contentBucketUri = pulumi . interpolate `s3://${ contentBucket . bucket } ` ;
252
252
export const contentBucketWebsiteEndpoint = contentBucket . websiteEndpoint ;
253
253
export const cloudFrontDomain = cdn . domainName ;
254
254
export const targetDomainEndpoint = `https://${ config . targetDomain } /` ;
0 commit comments