Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update aws-js-s3-folder to BucketV2 #1681

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
Loading