Skip to content

Commit

Permalink
Update aws-js-s3-folder to BucketV2 (#1681)
Browse files Browse the repository at this point in the history
  • Loading branch information
t0yv0 authored Oct 3, 2024
1 parent 5cc8709 commit 29142b3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions aws-js-s3-folder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 7 additions & 4 deletions aws-js-s3-folder/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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", {});

let siteBucketWebsiteConfig = new aws.s3.BucketWebsiteConfigurationV2("s3-website-bucket-config", {
bucket: siteBucket.id,
indexDocument: {
suffix: "index.html",
},
});

Expand Down Expand Up @@ -53,4 +56,4 @@ let bucketPolicy = new aws.s3.BucketPolicy("bucketPolicy", {

// Stack exports
exports.bucketName = siteBucket.bucket;
exports.websiteUrl = siteBucket.websiteEndpoint;
exports.websiteUrl = siteBucketWebsiteConfig.websiteEndpoint;

0 comments on commit 29142b3

Please sign in to comment.