-
Notifications
You must be signed in to change notification settings - Fork 14
Fix S3 permissions to allow CloudFront logging #1208
Conversation
bucket = "${aws_s3_bucket.logs.id}.s3.amazonaws.com" | ||
bucket = "${aws_s3_bucket.logs.bucket_domain_name}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two create no diff in the plan, but using bucket_domain_name
requires less manual stringiness.
variable "aws_cloudfront_canonical_user_id" { | ||
default = "c4c1ede66af53448b93c283ce9448c4ba468c9432aa01d700d3878632f77d2d0" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to hardcode this magic ID until hashicorp/terraform-provider-aws#12512 is merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
We should consider opening an issue in the backlog so we have something to remind us to clean this up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tracked in #1209!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes working as expected. 👍🏼 Shame, because I thought we had an issue that mirrored the one in other CA projects to confirm that this relationship wasn't severed, but after looking, I wasn't able to find one in the OAR repo.
fb61951
to
633d33e
Compare
Overview
Creates grants to prevent Terraform removing implicit grants that are usually created by AWS when creating a CloudFront distribution through the console. These grants have recently become necessary for CloudFront to persist access logs to S3.
The AWS canonical user grant replicates the permissions granted by the
private
canned ACL, and the CloudFront canonical user ID replicates the permissions granted when creating a distribution through the console.Testing Instructions
Checklist
fixup!
commits have been squashed