big-house-59728
10/07/2022, 2:43 PMaws-native
to create a CloudFront Distribution, and as far as I can tell from the documentation, I have all the required fields I should need in the following config:
const distribution = new awsn.cloudfront.Distribution(`${appName}-cache`, {
distributionConfig: {
enabled: true,
defaultCacheBehavior: {
targetOriginId: domain,
viewerProtocolPolicy: "redirect-to-https",
defaultTTL: 900,
allowedMethods: [
"GET",
"HEAD"
],
compress: true,
},
},
tags
});
I get a preview that tells me everything should get created, then when I go to run pulumi up
I get the following error:
Diagnostics:
pulumi:pulumi:Stack
error: update failed
aws-native:cloudfront:Distribution
error: operation CREATE failed with "InvalidRequest": Invalid request provided: 1 validation error detected: Value null at 'distributionConfigWithTags.distributionConfig.origins.items' failed to satisfy constraint: Member must not be null (Service: CloudFront, Status Code: 400, Request ID: be520947-ac5f-4fe0-a5d8-83ffb0bbafde)
Resources:
1 unchanged
Duration: 4s
Should I not be using aws-native
for CloudFront yet or is there something I am missing from this?