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

aws_codebuild_project environment_variable type support for SECRETS_MANAGER #11331

Closed
danielrbradley opened this issue Dec 17, 2019 · 4 comments · Fixed by #12572
Closed

aws_codebuild_project environment_variable type support for SECRETS_MANAGER #11331

danielrbradley opened this issue Dec 17, 2019 · 4 comments · Fixed by #12572
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/codebuild Issues and PRs that pertain to the codebuild service.
Milestone

Comments

@danielrbradley
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

The value SECRETS_MANAGER should be a valid value for the type field of an environment_variable for an aws_codebuild_project.

New or Affected Resource(s)

  • aws_codebuild_project
    • environment_variable

Potential Terraform Configuration

resource "aws_codebuild_project" "this" {
  name          = "my-name"
  description   = "my description"
  service_role  = "${var.role_arn}"
  build_timeout = "60"

  artifacts {
    type = "NO_ARTIFACTS"
  }

  environment {
    compute_type                = "t3.medium"
    image                       = "${var.image}"
    type                        = "LINUX_CONTAINER"
    environment_variable {
      name  = "SOME_KEY1"
      value = "secret:my-secret-key"
      type = "SECRETS_MANAGER"
    }
  }

  source {
    type                = "GITHUB"
    location            = "${var.source_repository_url}"
  }
}

References

@danielrbradley danielrbradley added the enhancement Requests to existing resources that expand the functionality or scope. label Dec 17, 2019
@ghost ghost added the service/codebuild Issues and PRs that pertain to the codebuild service. label Dec 17, 2019
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Dec 17, 2019
@bflad bflad removed the needs-triage Waiting for first response or review from a maintainer. label Dec 20, 2019
@NeoMopp
Copy link

NeoMopp commented Feb 18, 2020

A recent update to codebuild has deprecated the method we were using to pull secrets as environment variables via our build spec. We found a solution was to manually add the environment variables in the aws console and specify the Secrets Manager as their type. Of course with this method, when re running terraform for our codebuild we remove these environment variables and have to re add them manually. This Issue would solve our problem.

@bflad
Copy link
Contributor

bflad commented May 13, 2020

Support this has been merged and will release with version 2.62.0 of the Terraform AWS Provider, later this week. 👍

@ghost
Copy link

ghost commented May 15, 2020

This has been released in version 2.62.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 for triage. Thanks!

@ghost
Copy link

ghost commented Jun 13, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Jun 13, 2020
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. service/codebuild Issues and PRs that pertain to the codebuild service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants