Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canonical ID of CloudFront log delivery account #12512

Closed
limitusus opened this issue Mar 24, 2020 · 6 comments · Fixed by #15167
Closed

Canonical ID of CloudFront log delivery account #12512

limitusus opened this issue Mar 24, 2020 · 6 comments · Fixed by #15167
Labels
enhancement Requests to existing resources that expand the functionality or scope. new-data-source Introduces a new data source. service/cloudfront Issues and PRs that pertain to the cloudfront service.
Milestone

Comments

@limitusus
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

For acl in aws_s3_bucket, I want a data source that provides CloudFront log delivery account's canonical ID.

With acl configuration block, we can configure bucket ACL instead of canned ACLs.
We need to write the magical canonical ID of CloudFront log delivery account documented here.

  grant {
    type        = "CanonicalUser"
    permissions = ["FULL_CONTROL"]
    id          = "c4c1ede66af53448b93c283ce9448c4ba468c9432aa01d700d3878632f77d2d0"
  }

Now we have aws_canonical_user_id data resource, and I believe it's useful for having like this for CloudFront.
https://www.terraform.io/docs/providers/aws/d/canonical_user_id.html

New or Affected Resource(s)

  • data.aws_cloudfront_canonical_user_id maybe

Potential Terraform Configuration

data "aws_cloudfront_canonical_user_id" "current" {}

resource "aws_s3_bucket" "bucket" {
  bucket = "some-bucket"

  grant {
    type        = "CanonicalUser"
    permissions = ["FULL_CONTROL"]
    id          = data.aws_canonical_user_id.current.id
  }
  # CloudFront log delivery
  grant {
    type        = "CanonicalUser"
    permissions = ["FULL_CONTROL"]
    id          = data.aws_cloudfront_canonical_user_id.current.id
  }
  ...
}

References

  • N/A
@limitusus limitusus added the enhancement Requests to existing resources that expand the functionality or scope. label Mar 24, 2020
@ghost ghost added service/cloudfront Issues and PRs that pertain to the cloudfront service. service/s3 Issues and PRs that pertain to the s3 service. labels Mar 24, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Mar 24, 2020
@bryantbiggs
Copy link
Contributor

bump, this would be great

@ewbankkit ewbankkit added new-data-source Introduces a new data source. and removed needs-triage Waiting for first response or review from a maintainer. service/s3 Issues and PRs that pertain to the s3 service. labels Oct 21, 2020
@ewbankkit
Copy link
Contributor

@hgsgtk
Copy link
Contributor

hgsgtk commented Oct 21, 2020

oh...

a52cb28745c0c06e84ec548334e44bfa7fc2a85c54af20cd59e4969344b7af56

@hgsgtk
Copy link
Contributor

hgsgtk commented Feb 3, 2021

I tried to solve this issue by #15167 (not yet reviewed now).

@github-actions github-actions bot added this to the v3.60.0 milestone Sep 23, 2021
@github-actions
Copy link

This functionality has been released in v3.60.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Jun 6, 2022

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. new-data-source Introduces a new data source. service/cloudfront Issues and PRs that pertain to the cloudfront service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants