Skip to content

Commit

Permalink
Converting to BucketV2, fixes #1716
Browse files Browse the repository at this point in the history
  • Loading branch information
rshade committed Jan 10, 2025
1 parent dfae7af commit 15d3150
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion testing-integration-py/resource_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

def create_s3_bucket():
# Create an AWS resource (S3 Bucket)
bucket = s3.Bucket(BUCKET_NAME)
bucket = s3.BucketV2(BUCKET_NAME)

# Export the value of the bucket
pulumi.export(OUTPUT_KEY_BUCKET_NAME, bucket.bucket)
Expand Down
4 changes: 3 additions & 1 deletion testing-integration-py/test_s3_it.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ def setUpClass(cls) -> None:
cls.WORK_DIR = os.path.join(os.path.dirname(__file__))
cls.FILE_NAME = "bucket.txt"

cls.stack = auto.create_or_select_stack(stack_name=cls.STACK_NAME, work_dir=cls.WORK_DIR)
cls.stack = auto.create_or_select_stack(
stack_name=cls.STACK_NAME, work_dir=cls.WORK_DIR
)
cls.stack.set_config("aws:region", auto.ConfigValue(value=cls.REGION_NAME))
cls.stack.up(on_output=print)
cls.outputs = cls.stack.outputs()
Expand Down
8 changes: 4 additions & 4 deletions testing-unit-ts/mocha/bucket_pair.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ import * as pulumi from "@pulumi/pulumi";

export class BucketPair extends pulumi.ComponentResource {

contentBucket: aws.s3.Bucket;
logsBucket: aws.s3.Bucket;
contentBucket: aws.s3.BucketV2;
logsBucket: aws.s3.BucketV2;

constructor(contentBucketName: string, logsBucketName: string, opts: any) {
super("pulumi:examples:BucketPair", "BucketPair", {}, opts);

this.contentBucket = new aws.s3.Bucket("contentBucket", {
this.contentBucket = new aws.s3.BucketV2("contentBucket", {
bucket: contentBucketName,
}, { parent: this });

this.logsBucket = new aws.s3.Bucket("logsBucket", {
this.logsBucket = new aws.s3.BucketV2("logsBucket", {
bucket: logsBucketName,
}, { parent: this });

Expand Down

0 comments on commit 15d3150

Please sign in to comment.