From 2a3efe37f2247cc50bdd455fd3efa06d833bd7c5 Mon Sep 17 00:00:00 2001 From: Anton Tayanovskyy Date: Tue, 17 Sep 2024 16:38:18 -0400 Subject: [PATCH] Update aws-js-s3-folder to BucketV2 --- aws-js-s3-folder/README.md | 4 ++-- aws-js-s3-folder/index.js | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/aws-js-s3-folder/README.md b/aws-js-s3-folder/README.md index efa028333..8b7243880 100644 --- a/aws-js-s3-folder/README.md +++ b/aws-js-s3-folder/README.md @@ -38,8 +38,8 @@ with `***`. Performing changes: Type Name Status Info - + pulumi:pulumi:Stack aws-js-s3-folder-website-testing created - + ├─ aws:s3:Bucket s3-website-bucket created + + pulumi:pulumi:Stack aws-js-s3-folder-website-testing. created + + ├─ aws:s3:BucketV2 s3-website-bucket created + ├─ aws:s3:BucketPolicy bucketPolicy created + ├─ aws:s3:BucketObject favicon.png created + └─ aws:s3:BucketObject index.html created diff --git a/aws-js-s3-folder/index.js b/aws-js-s3-folder/index.js index 1d81bffb2..e6d014b92 100644 --- a/aws-js-s3-folder/index.js +++ b/aws-js-s3-folder/index.js @@ -5,9 +5,12 @@ const pulumi = require("@pulumi/pulumi"); const mime = require("mime"); // Create a bucket and expose a website index document -let siteBucket = new aws.s3.Bucket("s3-website-bucket", { - website: { - indexDocument: "index.html", +let siteBucket = new aws.s3.BucketV2("s3-website-bucket", {}); + +new aws.s3.BucketWebsiteConfigurationV2("s3-website-bucket-config", { + bucket: siteBucket.id, + indexDocument: { + suffix: "index.html", }, });