steep-apple-98525
07/27/2022, 7:50 PMimport com.pulumi.asset.FileAsset;
import com.pulumi.aws.s3.BucketObject;
import com.pulumi.aws.s3.BucketObjectArgs;
fun main() = Pulumi.run { ctx ->
// var bucket = ...
// Create an S3 Bucket object
BucketObject("index.html", BucketObjectArgs(
bucket = bucket.getId(),
source = new FileAsset("index.html"),
))
}
mammoth-salesclerk-61945
07/27/2022, 8:32 PMsteep-apple-98525
07/27/2022, 8:33 PMmammoth-salesclerk-61945
07/27/2022, 8:35 PMYour not supposed to use companion objects as a replacement for statics. You use package-level functions and extension functions. The only time you should ever use a companion object is for creating factory methods.the reasoning is the best thing I've ever read. yeah static is bad.
steep-apple-98525
07/27/2022, 8:37 PMmammoth-salesclerk-61945
07/27/2022, 8:40 PMsteep-apple-98525
07/27/2022, 8:40 PMmammoth-salesclerk-61945
07/27/2022, 8:50 PMbrave-dawn-64711
08/09/2022, 8:39 AM