https://pulumi.com logo
#getting-started
Title
# getting-started
m

magnificent-soccer-44287

11/18/2023, 6:04 PM
hi all, I seem to be getting kernel panic whenever I try to use an s3 website endpoint as an argument for a CF cdn:
Copy code
const prodRedirectBucket = new aws.s3.Bucket(pre('redirect'), {
    website: {
        redirectAllRequestsTo: '<https://www.pickmybrain.world>',
		
    },
	acl: "public-read"
}, { provider: usEast1 });

const distribution = new aws.cloudfront.Distribution(pre('redirectCdn'), {
    origins: prodRedirectBucket.websiteEndpoint.apply(endpoint => {
		return [{
			domainName: endpoint,
			originId: prodRedirectBucket.arn,
		}]
	}),
^ this produces:
Copy code
panic: interface conversion: interface {} is nil, not map[string]interface {}
    goroutine 83 [running]:
the following:
Copy code
const distribution = new aws.cloudfront.Distribution(pre('redirectCdn'), {
    origins: [{
			domainName: prodRedirectBucket.websiteEndpoint,
			originId: prodRedirectBucket.arn,
		}],
doesn't work. If I add dependsOn: bucket to the CDN, i get kernel panic again. It resolves successfully in const export = at the bottom.
I've tested setting the CDN to the website endpoint in AWS Console and it works just fine
the other error I get with a diff variation of the above is:
Copy code
panic: interface conversion: interface {} is nil, not map[string]interface {}
Also, in pulumi preview, the following:
Copy code
const distribution = new aws.cloudfront.Distribution(pre('redirectCdn'), {
    origins: prodRedirectBucket.websiteEndpoint.apply(endpoint => {
		console.dir(`ENDPOINT ${endpoint}`)
		return [{
			domainName: endpoint,
			originId: prodRedirectBucket.arn,
		}]
resolves correctly. but when trying pulumi up with the same code, it bombs
i

incalculable-motherboard-92742

11/21/2023, 7:23 PM
Hi @magnificent-soccer-44287 Would you please file an issue https://github.com/pulumi/pulumi/issues/new/choose to track this potential bug you've hit?