rajdeut / terraform-aws-nightscout

Terraform module to install Nightscout on AWS using free-tier infrastructure
MIT License
4 stars 8 forks source link

Error during terraform apply #3

Closed Breeze773 closed 9 months ago

Breeze773 commented 9 months ago

Hello, Thanks for this code. I now my way around aws and terraform well enough to run things, but I've been getting this error Error: error creating S3 bucket ACL for nightscout-codepipeline-****** during terraform apply. I was looking through the code and was wondering if there are some required variables not set but so far no luck with adding the name of my git repo, which is the standard 'cgm-remote-monitor' I'd appreciate any help. Thanks

dgrebb commented 9 months ago

@Breeze773 I opened a PR for the fix — just ran into this exact scenario last week.

The relevant info is in PR #4. For now, you can add the below just under the aws_s3_bucket.codepipeline_bucket resource in ./main.tf.

resource "aws_s3_bucket_ownership_controls" "codepipeline_bucket_ownership" {
  bucket = aws_s3_bucket.codepipeline_bucket.id
  rule {
    object_ownership = "ObjectWriter"
  }
}

Happy holidays!

Breeze773 commented 9 months ago

Thanks, @dgrebb That did the trick.