Terraform-provider-aws: aws_codebuild_project environment_variable type support for SECRETS_MANAGER

Created on 17 Dec 2019  ·  4Comments  ·  Source: hashicorp/terraform-provider-aws

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

enhancement serviccodebuild

Most helpful comment

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

All 4 comments

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.

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

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!

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!

Was this page helpful?
0 / 5 - 0 ratings