flat-yak-38918
06/23/2024, 6:31 PMacl='public-read'
, but then the code crashes on deploy Error creating S3 bucket: InvalidBucketAclWithObjectOwnership: Bucket cannot have ACLs set with ObjectOwnership's BucketOwnerEnforced setting
. Then, if you ask Pulumi AI how to fix it, it'll 100% of the time hallucinate an ownership_controls
argument to aws.s3.Bucket which simply doesn't exist.
Any tips on how to actually modify ownership controls on S3 buckets via Pulumi? It looks like a surprisingly nested parameter for something that is required when making buckets for public facing content.flat-yak-38918
06/23/2024, 6:51 PMflat-yak-38918
06/23/2024, 6:51 PMflat-yak-38918
06/23/2024, 7:11 PMimport pulumi
import pulumi_aws as aws
example = aws.s3.BucketV2("example", bucket="example")
example_bucket_ownership_controls = aws.s3.BucketOwnershipControls("example",
bucket=example.id,
rule=aws.s3.BucketOwnershipControlsRuleArgs(
object_ownership="BucketOwnerPreferred",
))
That seems to run into TypeError: sequence item 1: expected str instance, NoneType found
flat-yak-38918
06/23/2024, 7:11 PMflat-yak-38918
06/23/2024, 7:23 PM<https://github.com/pulumi/examples/blob/master/aws-py-s3-folder/__main__.py>
I'll report back with any more findings.