0
votes

I am trying to create a standalone AWS CodeBuild with terraform; it will have no source and no artifacts. But when I try to create it as such

resource aws_codebuild_project default {

  ...

  source {
    type = "NO_SOURCE"
  }

  artifacts {
    type = "NO_ARTIFACTS"
  }

  ...

}

I am getting error: "InvalidInputException: Invalid artifacts: artifact type NO_ARTIFACTS should have null output name"

I've tried set name and namespace_type to null and it seems to have no effect.

I am running terraform v0.12.26 and AWS provider v2.70.0

Any idea what is causing this error and how to fix it?

1
Odd. Is the resource definition you've posted definitely the same as what you're actually using? No typos, or other aws_codebuild_project blocks elsewhere in your directory that are wrong? - lxop
I tried to replicate with Terraform v0.12.28 and aws = "2.70.0", but I it works for me. Maybe if you could provide minimal reproducible code that can be just copied and pasted, it would be easier to verify. - Marcin

1 Answers

0
votes

I catch this problem too. I fixed it with delete and re apply