-
Notifications
You must be signed in to change notification settings - Fork 2
/
codebuild.tf
41 lines (34 loc) · 1.1 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
resource "aws_codebuild_project" "codebuild_project_plan_stage" {
name = var.codebuild_plan_project_name
description = "Terraform Planning Stage for infra VPC"
service_role = aws_iam_role.codebuild-role.arn
artifacts {
type = "CODEPIPELINE"
}
environment {
compute_type = "BUILD_GENERAL1_SMALL"
image = "hashicorp/terraform:latest"
type = "LINUX_CONTAINER"
}
source {
type = "CODEPIPELINE"
buildspec = file("buildspec/plan-buildspec.yml")
}
}
resource "aws_codebuild_project" "codebuild_project_apply_stage" {
name = var.codebuild_apply_project_name
description = "Terraform Apply Stage for infra VPC"
service_role = aws_iam_role.codebuild-role.arn
artifacts {
type = "CODEPIPELINE"
}
environment {
compute_type = "BUILD_GENERAL1_SMALL"
image = "hashicorp/terraform:latest"
type = "LINUX_CONTAINER"
}
source {
type = "CODEPIPELINE"
buildspec = file("buildspec/apply-buildspec.yml")
}
}