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

Error when creating a codebuild project #11732

Closed
jamesflight opened this issue Jan 23, 2020 · 3 comments
Closed

Error when creating a codebuild project #11732

jamesflight opened this issue Jan 23, 2020 · 3 comments
Labels
regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/codebuild Issues and PRs that pertain to the codebuild service.
Milestone

Comments

@jamesflight
Copy link

When creating a codebuild project using terraform, on the first run, I get the following error:

Error: Error creating CodeBuild project: InvalidInputException: 

  on codebuild.tf line 94, in resource "aws_codebuild_project" "codebuild_pipeline":
  94: resource "aws_codebuild_project" "codebuild_pipeline" {

But on a second run and subsequent runs after that, it works fine. Here is the code for the resource I am creating:

resource "aws_codebuild_project" "codebuild_pipeline" {
  name = "codebuild_pipeline"

  artifacts {
    type = "NO_ARTIFACTS"
  }

  cache {
    type  = "LOCAL"
    modes = ["LOCAL_DOCKER_LAYER_CACHE", "LOCAL_SOURCE_CACHE"]
  }

  environment {
    compute_type = "BUILD_GENERAL1_SMALL"
    image = "aws/codebuild/standard:2.0"
    type = "LINUX_CONTAINER"
    privileged_mode = true

    environment_variable {
      name  = "GITHUB_PERSONAL_ACCESS_TOKEN"
      value = var.github_personal_access_token
    }

    environment_variable {
      name  = "ENVIRONMENT"
      value = var.environment
    }
  }

  source {
    type            = "GITHUB"
    location        = "[retracted url]"
    git_clone_depth = 1
    auth {
      type = "OAUTH"
      resource = aws_codebuild_source_credential.github_personal_access_token.arn
    }
  }

  service_role  = aws_iam_role.codebuild_iam_role.arn
}

Worth noting that this is identical to this stackoverflow post from yesterday posted by someone else: https://stackoverflow.com/questions/59849829/erro-in-create-aws-codebuild-project#

@ghost ghost added the service/codebuild Issues and PRs that pertain to the codebuild service. label Jan 23, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jan 23, 2020
@bflad bflad added regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. and removed needs-triage Waiting for first response or review from a maintainer. labels Jan 23, 2020
@bflad bflad added this to the v2.46.0 milestone Jan 23, 2020
@bflad
Copy link
Contributor

bflad commented Jan 23, 2020

Hi @jamesflight 👋 Thank you for reporting this issue and sorry you are running into trouble. This is a similar report to #11642 and #11709, which is due to #11682 so to consolidate discussions and efforts, I'm going to close this issue in preference of #11682. The good news is that this should be resolved via AWS Go SDK update that was merged yesterday and Terraform AWS Provider release later today. 👍

@bflad bflad closed this as completed Jan 23, 2020
@ghost
Copy link

ghost commented Jan 23, 2020

This has been released in version 2.46.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 Mar 27, 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 Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/codebuild Issues and PRs that pertain to the codebuild service.
Projects
None yet
Development

No branches or pull requests

2 participants