stavxyz / terraform-aws-backend

A Terraform module for your AWS Backend + a guide for bootstrapping your terraform managed project
Apache License 2.0
53 stars 32 forks source link

bucket creation failure due to acl/ownership conflict #27

Open sparr opened 2 months ago

sparr commented 2 months ago

https://github.com/hashicorp/terraform-provider-aws/issues/26164

Error: creating S3 Bucket (foo-tf-state-logs): operation error S3: CreateBucket, https response error StatusCode: 400, RequestID: XKSF4PSZPC0TFSRK, HostID: RwFULMMW2Lvj/CXLARoI9m1YZup/gYgM6+SToJn+T/3zIaWxpHGTYfVIomoJRY+XMMoYmPDa6VfZgFyezUvQBA==, api error InvalidBucketAclWithObjectOwnership: Bucket cannot have ACLs set with ObjectOwnership's BucketOwnerEnforced setting

I have been working around this by doing sed -i.bak 's/^ acl/# acl/' .terraform/modules/backend/main.tf after init/update the backend module, but that's very hacky.