https://registry.terraform.io/providers/hashicorp/aws/4.40.0/docs/resources/codebuild_project.html#environment
resource "aws_codebuild_project" "code_build" {
name = var.code_build_project_name
description = "CodeBuild project"
service_role = aws_iam_role.codebuild_role.arn
build_timeout = "10"
source {
type = "CODEPIPELINE"
buildspec = "buildspec.yml"
}
artifacts {
type = "CODEPIPELINE"
}
environment {
compute_type = "BUILD_GENERAL1_SMALL"
image = "aws/codebuild/amazonlinux2-x86_64-standard:5.0"
type = "LINUX_CONTAINER"
image_pull_credentials_type = "CODEBUILD"
environment_variable {
name = "S3_BUCKET_NAME"
value = "some value"
type = "PLAINTEXT"
}
}
}
Expected Behavior
Not adding in the aws code build environment. It should create the environment variable in the codebuild stage in aws but it is not creating it.
Actual Behavior
It should create the code build environment variable there.
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
# make sure to add the versions so that future versions may not break the code
terraform {
required_version = ">= 1.7.0"
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.33.0"
}
}
}
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Terraform Core Version
1.7.0
AWS Provider Version
5.33.0
Affected Resource(s)
Expected Behavior
Not adding in the aws code build environment. It should create the environment variable in the codebuild stage in aws but it is not creating it.
Actual Behavior
It should create the code build environment variable there.
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None