terraform-aws-codebuild
terraform-aws-codebuild copied to clipboard
NO_ARTIFACTS = InvalidInputException
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
}
]
}
I have the same issue
Same here. Also I switch to S3 to try and workaround I get "Invalid artifacts: location is required" but cannot see the property listed
destroying and recreating it solved the issue for me
Manually changing the Codebuild project artifacts configuration, then returning with the Terraform modification sufficiently worked around the issue for me.
@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.
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