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

[Enhancement]: aws_codeartifact_domain: add s3 bucket ARN attribute #35302

Closed
Michagogo opened this issue Jan 14, 2024 · 4 comments · Fixed by #35760
Closed

[Enhancement]: aws_codeartifact_domain: add s3 bucket ARN attribute #35302

Michagogo opened this issue Jan 14, 2024 · 4 comments · Fixed by #35760
Labels
enhancement Requests to existing resources that expand the functionality or scope. good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. service/codeartifact Issues and PRs that pertain to the codeartifact service.
Milestone

Comments

@Michagogo
Copy link
Contributor

Description

The DescribeDomain API returns a value, s3BucketArn, which contains (surprise!) the ARN of the S3 bucket that is used to store package assets for that domain. It would be useful to be able to reference that value in order to allow access to it in various policies (IAM, VPCE, etc.), but right now as far as I can tell it’s not exposed as an attribute of the resource.

Affected Resource(s) and/or Data Source(s)

aws_codeartifact_domain

Potential Terraform Configuration

resource "random_pet" "domain" {}

resource "aws_codeartifact_domain" "example" {
  domain = random_pet.domain.id
}

locals {
  package_bucket = aws_codeartifact_domain.example.s3_bucket_arn
}

References

https://docs.aws.amazon.com/codeartifact/latest/ug/create-s3-gateway-endpoint.html
https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_DomainDescription.html

Would you like to implement a fix?

No

@Michagogo Michagogo added the enhancement Requests to existing resources that expand the functionality or scope. label Jan 14, 2024
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/codeartifact Issues and PRs that pertain to the codeartifact service. label Jan 14, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Jan 14, 2024
@justinretzolk justinretzolk added good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. and removed needs-triage Waiting for first response or review from a maintainer. labels Jan 16, 2024
@Michagogo
Copy link
Contributor Author

Note that this seems slightly less important as it did at the time, as it turns out that (according to a response from the service team, via Support, after I observed differing behavior) the CodeArtifact documentation is somewhat outdated and, despite saying that access to the S3 bucket is necessary in order to fetch the actual artifacts, when downloading packages (at least, Python packages from PyPI - I didn’t test other types.) the packages are downloaded via the CodeArtifact VPC endpoint with no direct access to S3.
That said:
• I don’t know whether this is the case with other package types, and it’s possible that in some scenarios it is necessary to grant access to the bucket
• There may be other use cases for having easy access to the information about the underlying bucket that aren’t coming to mind immediately
• The attribute is returned by the Describe API

So it’s still probably a good idea to add the attribute to the resource and data source.

Copy link

This functionality has been released in v5.37.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!

Copy link

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 Mar 17, 2024
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. good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. service/codeartifact Issues and PRs that pertain to the codeartifact service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants