From d630e6be6988c168ab745b8e1bee878a50971a5d Mon Sep 17 00:00:00 2001 From: Anton Tayanovskyy Date: Thu, 19 Sep 2024 15:31:24 -0400 Subject: [PATCH] Update kubernetes-ts-s3-rollout to BucketV2 --- kubernetes-ts-s3-rollout/s3Helpers.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kubernetes-ts-s3-rollout/s3Helpers.ts b/kubernetes-ts-s3-rollout/s3Helpers.ts index cc7548fd0..df17e92c0 100644 --- a/kubernetes-ts-s3-rollout/s3Helpers.ts +++ b/kubernetes-ts-s3-rollout/s3Helpers.ts @@ -9,24 +9,24 @@ import * as pulumi from "@pulumi/pulumi"; export interface FileBucketOpts { files: string[]; - policy?: (bucket: aws.s3.Bucket) => pulumi.Output; + policy?: (bucket: aws.s3.BucketV2) => pulumi.Output; } export class FileBucket { - public readonly bucket: aws.s3.Bucket; + public readonly bucket: aws.s3.BucketV2; public readonly files: { [key: string]: aws.s3.BucketObject }; public readonly policy: aws.s3.BucketPolicy; private readonly fileContents: { [key: string]: string }; constructor(bucketName: string, opts: FileBucketOpts) { - this.bucket = new aws.s3.Bucket(bucketName); + this.bucket = new aws.s3.BucketV2(bucketName); this.fileContents = {}; this.files = {}; for (const file of opts.files) { this.fileContents[file] = fs.readFileSync(file).toString(); this.files[file] = new aws.s3.BucketObject(file, { - bucket: this.bucket, + bucket: this.bucket.bucket, source: new pulumi.asset.FileAsset(file), contentType: mime.getType(file) || undefined, });