sparse-intern-71089
10/14/2019, 3:29 PMincalculable-diamond-5088
10/14/2019, 3:31 PMnew BucketPolicy('allow-write-by-segment-io', {
bucket: segmentLogs.bucket.id,
policy: segmentLogsPolicy.json,
}, { parent: segmentLogs.bucket })
Here segmentLogs.bucket is an aws.s3.Bucket
incalculable-diamond-5088
10/14/2019, 9:30 PMfunction __export(m) {
console.log(m) // <<<-------
for (var p in m) if (!exports.hasOwnProperty(p)) {
console.log(`Exporting ${p}`) // <<<-------
exports[p] = m[p];
}
}
Object.defineProperty(exports, "__esModule", { value: true });
// Export members:
console.log('Importing lambdaMixins') // <<<-------
__export(require("./lambdaMixins"));
// ...
Then only Importing lambdaMixins
is being printed, and none of the Exporting ...
is printed out.
Looks like some sort of circular dependency to meincalculable-diamond-5088
10/14/2019, 9:39 PMimport { BucketPolicy } from '@pulumi/aws/s3'
import { getPolicyDocument } from '@pulumi/aws/iam'
const policy = getPolicyDocument(...)
new BucketPolicy(..., { ..., policy: policy.json })
I modified it to the following and it worked:
import * as aws from '@pulumi/aws'
const policy = aws.iam.getPolicyDocument(...)
new aws.s3.BucketPolicy(..., { ..., policy: policy.json })
Looks like a typescript problem