Skip to content

Commit

Permalink
Update aws-py-s3-folder to BucketV2
Browse files Browse the repository at this point in the history
  • Loading branch information
t0yv0 committed Sep 17, 2024
1 parent f143bd3 commit a7e6136
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion aws-py-s3-folder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ with `***`.
Type Name Plan
+ pulumi:pulumi:Stack aws-py-s3-folder-dev create
+ ├─ aws:s3:Bucket s3-website-bucket create
+ ├─ aws:s3:BucketV2 s3-website-bucket create
+ ├─ aws:s3:BucketObject index.html create
+ ├─ aws:s3:BucketObject python.png create
+ ├─ aws:s3:BucketObject favicon.png create
Expand Down
11 changes: 5 additions & 6 deletions aws-py-s3-folder/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
from pulumi import FileAsset, Output, export, ResourceOptions
from pulumi_aws import s3

web_bucket = s3.Bucket(
"s3-website-bucket",
website={
"index_document": "index.html",
},
web_bucket = s3.BucketV2("s3-website-bucket")

web_site = s3.BucketWebsiteConfigurationV2(
"s3-website", bucket=web_bucket.bucket, index_document={"suffix": "index.html"}
)

public_access_block = s3.BucketPublicAccessBlock(
Expand Down Expand Up @@ -53,4 +52,4 @@ def public_read_policy_for_bucket(bucket_name):

# Export the name of the bucket
export("bucket_name", web_bucket.id)
export("website_url", web_bucket.website_endpoint)
export("website_url", web_site.website_endpoint)

0 comments on commit a7e6136

Please sign in to comment.