-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathcodebuild.tf
52 lines (46 loc) · 1.24 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
data "template_file" "buildspec" {
template = file("buildspec.yml")
vars = {
env = var.env
}
}
resource "aws_codebuild_project" "static_web_build" {
badge_enabled = false
build_timeout = 60
name = "static-web-build"
queued_timeout = 480
service_role = aws_iam_role.static_build_role.arn
tags = {
Environment = var.env
}
artifacts {
encryption_disabled = false
name = "static-web-build-${var.env}"
override_artifact_name = false
packaging = "NONE"
type = "CODEPIPELINE"
}
environment {
compute_type = "BUILD_GENERAL1_SMALL"
image = "aws/codebuild/amazonlinux2-x86_64-standard:2.0"
image_pull_credentials_type = "CODEBUILD"
privileged_mode = false
type = "LINUX_CONTAINER"
}
logs_config {
cloudwatch_logs {
status = "ENABLED"
}
s3_logs {
encryption_disabled = false
status = "DISABLED"
}
}
source {
buildspec = data.template_file.buildspec.rendered
git_clone_depth = 0
insecure_ssl = false
report_build_status = false
type = "CODEPIPELINE"
}
}