-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcodebuild.tf
60 lines (49 loc) · 1.31 KB
/
codebuild.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
resource "aws_codebuild_project" "codebuild-project" {
name = "codebuild-project"
description = "Codebuild Project"
build_timeout = "5"
service_role = aws_iam_role.codebuild-role.arn
artifacts {
type = "NO_ARTIFACTS"
}
cache {
type = "S3"
location = aws_s3_bucket.codebuild_bucket.bucket
}
environment {
compute_type = "BUILD_GENERAL1_SMALL"
image = "aws/codebuild/standard:1.0"
type = "LINUX_CONTAINER"
image_pull_credentials_type = "CODEBUILD"
// environment_variable {
// name = "SOME_KEY1"
// value = "SOME_VALUE1"
// }
//
// environment_variable {
// name = "SOME_KEY2"
// value = "SOME_VALUE2"
// type = "PARAMETER_STORE"
// }
}
logs_config {
cloudwatch_logs {
group_name = "log-group"
stream_name = "log-stream"
}
s3_logs {
status = "ENABLED"
location = "${aws_s3_bucket.codebuild_bucket.id}/build-log"
}
}
source {
type = "GITHUB"
location = "https://github.com/amarstays/anagram-discussion.git"
git_clone_depth = 1
git_submodules_config {
fetch_submodules = true
}
}
source_version = "main"
tags = var.custom_tags
}