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

In Terraform 0.11.8, aws_codebuild_project resource does not expose logsConfig from AWS API #6312

Closed
emmanuel opened this issue Oct 31, 2018 · 4 comments · Fixed by #7534
Closed
Assignees
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

@emmanuel
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 "me too" comments, 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

In the current implementation, the aws_codebuild_project resource does not expose the logsConfig from the upstream AWS SDK. The impact is that CodeBuild creates a log group with unbounded retention and the user cannot configure it.

New or Affected Resource(s)

  • aws_codebuild_project

Potential Terraform Configuration

Proposed HCL:

resource "aws_codebuild_project" "example" {
  name          = "test-project"
  description   = "test_codebuild_project"
  build_timeout = "5"
  service_role  = "${aws_iam_role.example.arn}"

  logs_config {
    cloudwatch_logs {
      status = "ENABLED|DISABLED"
      group_name = "..."
      stream_name = "..."
    }
    s3_logs {
      status = "ENABLED|DISABLED"
      location = "..." # ARN of an S3 bucket and the path prefix for S3 logs
    }
  }

  artifacts {
    ...
  }

  cache {
    ...
  }

  environment {
    ...
  }

  source {
    ...
  }

  vpc_config {
    ...
  }

  tags {
    ...
  }
}

References

It appears that this option was simply omitted from the exposed interface. It is an optional field with
(somewhat) reasonable defaults, so this is very understandable.

There was an earlier pull request that exposed vpc_config, which is another optional member of
aws_codebuild_project.

I would be happy to submit an implementation. I would leverage as much as I could from #3324, which seems to be a very similar situation.

@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. service/codebuild Issues and PRs that pertain to the codebuild service. labels Oct 31, 2018
@vibhuyadav
Copy link

I was about to open the same issue. Thanks @emmanuel

@bflad bflad self-assigned this Jul 8, 2019
@bflad bflad added this to the v2.19.0 milestone Jul 10, 2019
@bflad
Copy link
Contributor

bflad commented Jul 10, 2019

Support for managing the logging configuration has been merged and will release with version 2.19.0 of the Terraform AWS Provider, likely in the next two days. 👍 Thanks to @srhaber!

@bflad
Copy link
Contributor

bflad commented Jul 11, 2019

This has been released in version 2.19.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 Nov 2, 2019

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 Nov 2, 2019
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