Compute_type = “BUILD_GENERAL1_XLARGE”

Hello,
When I try to change the compute_type of the deployment stage in terraform to BUILD_GENERAL1_XLARGE, the following error occurred.

Configuration that i tried:

resource “aws_codebuild_project” “deploy” {
name = “var.env−{var.name}-deploy”
build_timeout = “25”
service_role = var.role
artifacts {
type = “CODEPIPELINE”
}
environment {
compute_type = “BUILD_GENERAL1_XLARGE”
image = “aws/codebuild/amazonlinux2-x86_64-standard:4.0”
type = “LINUX_CONTAINER”
image_pull_credentials_type = “CODEBUILD”

Error:
│ Error: expected environment.0.compute_type to be one of [“BUILD_GENERAL1_SMALL” “BUILD_GENERAL1_MEDIUM” “BUILD_GENERAL1_LARGE” “BUILD_GENERAL1_2XLARGE” “BUILD_LAMBDA_1GB” “BUILD_LAMBDA_2GB” “BUILD_LAMBDA_4GB” “BUILD_LAMBDA_8GB” “BUILD_LAMBDA_10GB”], got BUILD_GENERAL1_XLARGE

│ with module.pipeline.module.runtime_channels.aws_codebuild_project.deploy,
│ on …..\modules\pipeline-sls\main.tf line 198, in resource “aws_codebuild_project” “deploy”:
│ 198: compute_type = “BUILD_GENERAL1_XLARGE”

But in the console aws this value is accepted.

Tks!

Hi @leonardo.batista

Is this a new option for the provider? Are you using the latest provider release?
If you have AWS specific questions, you may want to try asking in the AWS Category, or check their issue tracker.

1 Like

Hello, thanks for the reply!

I just updated the Terraform exe, could this issue be due to the provider validation and not the Terraform exe?

That error is definitely coming from the provider, it is not related to the Terraform CLI at all.

1 Like

Thanks @jbardin !

I will update my provider and test again!