11import { Construct } from 'constructs' ;
22import { App , TerraformOutput , TerraformStack } from 'cdktf' ;
3- import { AwsProvider , S3Bucket } from './.gen/providers/aws' ;
3+ import { AwsProvider , s3 } from './.gen/providers/aws' ;
44
55class MyStack extends TerraformStack {
66 constructor ( scope : Construct , name : string ) {
@@ -12,26 +12,8 @@ class MyStack extends TerraformStack {
1212
1313 const BUCKET_NAME = 'cdktf-typescript-demo-us-east-1' ;
1414
15- const bucket = new S3Bucket ( this , 'aws_s3_bucket' , {
15+ const bucket = new s3 . S3Bucket ( this , 'aws_s3_bucket' , {
1616 bucket : BUCKET_NAME ,
17- versioning : [
18- {
19- enabled : true ,
20- } ,
21- ] ,
22- serverSideEncryptionConfiguration : [
23- {
24- rule : [
25- {
26- applyServerSideEncryptionByDefault : [
27- {
28- sseAlgorithm : 'AES256' ,
29- } ,
30- ] ,
31- } ,
32- ] ,
33- } ,
34- ] ,
3517 lifecycleRule : [
3618 { enabled : true , id : 'abort-multipart' , prefix : '/' , abortIncompleteMultipartUploadDays : 7 } ,
3719 { enabled : true , transition : [ { days : 30 , storageClass : 'STANDARD_IA' } ] } ,
@@ -40,8 +22,6 @@ class MyStack extends TerraformStack {
4022 { enabled : false , noncurrentVersionTransition : [ { days : 90 , storageClass : 'ONEZONE_IA' } ] } ,
4123 { enabled : false , transition : [ { days : 365 , storageClass : 'GLACIER' } ] } ,
4224 { enabled : false , noncurrentVersionTransition : [ { days : 365 , storageClass : 'ONEZONE_IA' } ] } ,
43- { enabled : false , expiration : [ { days : 365 } ] } ,
44- { enabled : false , noncurrentVersionExpiration : [ { days : 365 } ] } ,
4525 ] ,
4626 tags : {
4727 Team : 'Devops' ,
0 commit comments