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

NO_ARTIFACTS = InvalidInputException #63

Open
twigs67 opened this issue Aug 19, 2020 · 6 comments
Open

NO_ARTIFACTS = InvalidInputException #63

twigs67 opened this issue Aug 19, 2020 · 6 comments
Labels
bug 🐛 An issue with the system

Comments

@twigs67
Copy link

twigs67 commented Aug 19, 2020

Hello,

I'm getting the error:

Invalid artifacts: artifact type NO_ARTIFACTS should have null output name

Maybe I'm missing something?

module "build" {
  source              = "git::https://github.com/cloudposse/terraform-aws-codebuild.git?ref=master"
  namespace           = var.environment
  stage               = var.project
  name                = var.name

  # https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
  build_image         = "aws/codebuild/standard:4.0"
  build_compute_type  = "BUILD_GENERAL1_SMALL"
  build_timeout       = 60
  artifact_type       = "NO_ARTIFACTS"

  # These attributes are optional, used as ENV variables when building Docker images and pushing them to ECR
  # For more info:
  # http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html
  # https://www.terraform.io/docs/providers/aws/r/codebuild_project.html

  privileged_mode     = true
  aws_region          = "us-east-1"
  aws_account_id      = var.aws_account_numbers[0]
  image_repo_name     = var.image_repo_name
  image_tag           = var.image_tag
  private_repository  = true

  source_credential_auth_type   = "PERSONAL_ACCESS_TOKEN"
  source_credential_server_type = "GITHUB"
  source_credential_token       = var.github_access_token

  buildspec = "buildspec.yml"

  # Optional extra environment variables
  environment_variables = [
    {
      name = "AWS_DEFAULT_REGION"
      value = var.aws_region
    }
  ]
}
@twigs67 twigs67 added the bug 🐛 An issue with the system label Aug 19, 2020
@dominic-byrne-worldpay
Copy link

I have the same issue

@andrewrutter
Copy link

Same here. Also I switch to S3 to try and workaround I get "Invalid artifacts: location is required" but cannot see the property listed

@python3k
Copy link

python3k commented Mar 9, 2021

destroying and recreating it solved the issue for me

@twmartin
Copy link

Manually changing the Codebuild project artifacts configuration, then returning with the Terraform modification sufficiently worked around the issue for me.

@nitrocode
Copy link
Member

nitrocode commented Jun 21, 2022

@twmartin @python3k @andrewrutter @dominic-byrne-worldpay @twigs67

Is this problem still affecting you folks ? Do you folks know of a way to resolve this in terraform ? What version of the aws provider are you folks using ?

https://stackoverflow.com/questions/63477000/terraform-aws-codebuild-project-error-invalidinputexception

It's possible this is a provider bug.

@mmigliari
Copy link

This is also an issue for me. Fixed it by destroying the codebuild project then re-creating it (commenting out in terraform). I'm using provider version 5.19.0 and terraform >= 1.5.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

No branches or pull requests

7 participants