You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform Version
Terraform v0.11.10
provider.aws v1.46.0
provider.github v1.3.0
provider.random v2.0.0
provider.template v1.0.0
provider.vault v1.3.1
Affected Resource(s)
aws_codebuild_project
Terraform Configuration Files
resource"aws_codebuild_project""default" {
count="${var.enabled=="true"?1:0}"name="${module.label.id}"service_role="${aws_iam_role.default.arn}"artifacts {
type="${var.artifact_type}"
}
# The cache as a list with a map object inside.cache=["${local.cache}"]
environment {
compute_type="${var.build_compute_type}"image="${var.build_image}"type="LINUX_CONTAINER"privileged_mode="${var.privileged_mode}"environment_variable=[{
"name"="foo""value"="${data.vault_generic_secret.build_secrets.data["FOO"]}"
}]
}
source {
buildspec="${var.buildspec}"type="${var.source_type}"location="${var.source_location}"
}
tags="${module.label.tags}"
}
Community Note
Terraform Version
Terraform v0.11.10
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/aequasi/4d8af4a8afbd67889b90c0345f394d56
Panic Output
Expected Behavior
the environment variable "foo" is set to the value from the data accessor (or even a module output, as this fails as well)
Actual Behavior
Error: aws_codebuild_project.default: "environment.0.environment_variable.0.name": required field is not set
Error: aws_codebuild_project.default: "environment.0.environment_variable.0.value": required field is not set
Steps to Reproduce
terraform apply
Important Factoids
Code snippet from above came from this project:
https://github.com/cloudposse/terraform-aws-codebuild
References
The text was updated successfully, but these errors were encountered: