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-ts-s3-folder to BucketV2 #1680

Merged
merged 2 commits into from
Sep 30, 2024
Merged
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-ts-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
9 changes: 8 additions & 1 deletion aws-ts-s3-folder/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ const siteBucket = new aws.s3.Bucket("s3-website-bucket", {
},
});

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

const publicAccessBlock = new aws.s3.BucketPublicAccessBlock("public-access-block", {
bucket: siteBucket.id,
blockPublicAcls: false,
Expand Down Expand Up @@ -49,4 +56,4 @@ const bucketPolicy = new aws.s3.BucketPolicy("bucketPolicy", {

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