sparse-intern-71089
12/21/2018, 10:19 PMwhite-balloon-205
if _, err := s3.NewBucketObject(ctx, name, &s3.BucketObjectArgs{
Bucket: siteBucket.ID(), // reference to the s3.Bucket object
Source: asset.NewFileAsset(filePath), // use FileAsset to point to a file
ContentType: mime.TypeByExtension(path.Ext(name)), // set the MIME type of the file
}, pulumi.ResourceOpt{DependsOn: []pulumi.Resource{acl}}); err != nil {
return err
}
white-balloon-205
DependsOn
is only needed when the dependency is not explicit. I think this is indeed a case where the objects depend on the ACL implicitly and so the dependency does need to be provided via DependsOn
.ambitious-furniture-60362
12/22/2018, 6:14 PMambitious-furniture-60362
12/22/2018, 6:14 PM