File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -9,24 +9,24 @@ import * as pulumi from "@pulumi/pulumi";
9
9
10
10
export interface FileBucketOpts {
11
11
files : string [ ] ;
12
- policy ?: ( bucket : aws . s3 . Bucket ) => pulumi . Output < string > ;
12
+ policy ?: ( bucket : aws . s3 . BucketV2 ) => pulumi . Output < string > ;
13
13
}
14
14
15
15
export class FileBucket {
16
- public readonly bucket : aws . s3 . Bucket ;
16
+ public readonly bucket : aws . s3 . BucketV2 ;
17
17
public readonly files : { [ key : string ] : aws . s3 . BucketObject } ;
18
18
public readonly policy : aws . s3 . BucketPolicy ;
19
19
20
20
private readonly fileContents : { [ key : string ] : string } ;
21
21
22
22
constructor ( bucketName : string , opts : FileBucketOpts ) {
23
- this . bucket = new aws . s3 . Bucket ( bucketName ) ;
23
+ this . bucket = new aws . s3 . BucketV2 ( bucketName ) ;
24
24
this . fileContents = { } ;
25
25
this . files = { } ;
26
26
for ( const file of opts . files ) {
27
27
this . fileContents [ file ] = fs . readFileSync ( file ) . toString ( ) ;
28
28
this . files [ file ] = new aws . s3 . BucketObject ( file , {
29
- bucket : this . bucket ,
29
+ bucket : this . bucket . bucket ,
30
30
source : new pulumi . asset . FileAsset ( file ) ,
31
31
contentType : mime . getType ( file ) || undefined ,
32
32
} ) ;
You can’t perform that action at this time.
0 commit comments