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]: Allow CodeBuild Source Credentials Resource to leverage Secrets Manager/Parameter Store #29972

Open
stevebott opened this issue Mar 13, 2023 · 2 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/codebuild Issues and PRs that pertain to the codebuild service. upstream Addresses functionality related to the cloud provider.

Comments

@stevebott
Copy link

Description

Allow CodeBuild Source Credentials Resource (aws_codebuild_source_credential) to leverage Secrets Manager or Parameter Store for the token, vs. requiring the token to be stored in the terraform code as plain text.

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

  • aws_codebuild_source_credential

Potential Terraform Configuration

resource "aws_codebuild_source_credential" "secret-example" {
  auth_type   = "PERSONAL_ACCESS_TOKEN"
  server_type = "GITHUB"
  token       = {
    value = "arn:aws:secretsmanager:<region>:<account>:secret:github-secrets:access-token"
    type  = "SECRETS_MANAGER"
  }

resource "aws_codebuild_source_credential" "parameter-example" {
  auth_type   = "PERSONAL_ACCESS_TOKEN"
  server_type = "GITHUB"
  token       = {
    value = "arn:aws:ssm:<region>:<account>:parameter/github/access-tokenS"
    type  = "PARAMETER_STORE"
  }

resource "aws_codebuild_source_credential" "plain-example-full" {
  auth_type   = "PERSONAL_ACCESS_TOKEN"
  server_type = "GITHUB"
  token       = {
    value = "xxxxxxxxxxxxxxxxxxxxxxxxxx"
    type  = "PLAINTEXT"
  }

resource "aws_codebuild_source_credential" "plain-example-minimal" {
  auth_type   = "PERSONAL_ACCESS_TOKEN"
  server_type = "GITHUB"
  token       = "xxxxxxxxxxxxxxxxxxxxxxxxxx"
}

References

No response

Would you like to implement a fix?

No

@stevebott stevebott added enhancement Requests to existing resources that expand the functionality or scope. needs-triage Waiting for first response or review from a maintainer. labels Mar 13, 2023
@github-actions
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/codebuild Issues and PRs that pertain to the codebuild service. label Mar 13, 2023
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Mar 14, 2023
@DrFaust92 DrFaust92 added the upstream Addresses functionality related to the cloud provider. label Mar 15, 2023
@DrFaust92
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/codebuild Issues and PRs that pertain to the codebuild service. upstream Addresses functionality related to the cloud provider.
Projects
None yet
Development

No branches or pull requests

3 participants