Skip to content

Commit 141af4e

Browse files
robinbowesosterman
authored andcommitted
Allow optional buildspec to be passed to build project (#2)
1 parent 2a23e93 commit 141af4e

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ resource "aws_iam_role_policy_attachment" "codebuild_s3" {
3636
| name | codebuild | Name |
3737
| image | alpine | Docker image used as environment |
3838
| instance_size | BUILD_GENERAL1_SMALL | Instance size for job. Possible values are: ```BUILD_GENERAL1_SMALL``` ```BUILD_GENERAL1_MEDIUM``` ```BUILD_GENERAL1_LARGE``` |
39+
| buildspec | "" | Optional buildspec declaration to use for building the project |
3940

4041
## Output
4142

main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ resource "aws_codebuild_project" "default" {
7373
}
7474

7575
source {
76-
type = "CODEPIPELINE"
76+
buildspec = "${var.buildspec}"
77+
type = "CODEPIPELINE"
7778
}
7879

7980
tags = "${module.label.tags}"

variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@ variable "image" {
1717
variable "instance_size" {
1818
default = "BUILD_GENERAL1_SMALL"
1919
}
20+
21+
variable "buildspec" {
22+
default = ""
23+
description = "Optional buildspec declaration to use for building the project"
24+
}

0 commit comments

Comments
 (0)