-
Notifications
You must be signed in to change notification settings - Fork 8
/
aws_codebuild_project.project.tf
40 lines (35 loc) · 1.2 KB
/
aws_codebuild_project.project.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
resource "aws_codebuild_project" "project" {
name = replace(var.name, ".", "-")
description = var.description
service_role = var.role == "" ? element(concat(aws_iam_role.codebuild.*.arn, [""]), 0) : element(concat(data.aws_iam_role.existing.*.arn, [""]), 0)
build_timeout = var.build_timeout
encryption_key = var.kms_key_id
artifacts {
encryption_disabled = var.encryption_disabled
location = local.bucketname
name = var.name
namespace_type = var.artifact["namespace_type"]
packaging = var.artifact["packaging"]
type = var.artifact_type
}
environment {
compute_type = var.environment["compute_type"]
image = var.environment["image"]
type = var.environment["type"]
privileged_mode = var.environment["privileged_mode"]
}
source {
type = var.sourcecode["type"]
location = var.sourcecode["location"]
buildspec = var.sourcecode["buildspec"]
}
logs_config {
s3_logs {
//default value false
encryption_disabled = false
status = "ENABLED"
location = var.logs_bucket
}
}
tags = var.common_tags
}