Skip to content

Commit

Permalink
Allow optional buildspec to be passed to build project (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
robinbowes authored and osterman committed Aug 20, 2017
1 parent 2a23e93 commit 141af4e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ resource "aws_iam_role_policy_attachment" "codebuild_s3" {
| name | codebuild | Name |
| image | alpine | Docker image used as environment |
| instance_size | BUILD_GENERAL1_SMALL | Instance size for job. Possible values are: ```BUILD_GENERAL1_SMALL``` ```BUILD_GENERAL1_MEDIUM``` ```BUILD_GENERAL1_LARGE``` |
| buildspec | "" | Optional buildspec declaration to use for building the project |

## Output

Expand Down
3 changes: 2 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ resource "aws_codebuild_project" "default" {
}

source {
type = "CODEPIPELINE"
buildspec = "${var.buildspec}"
type = "CODEPIPELINE"
}

tags = "${module.label.tags}"
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ variable "image" {
variable "instance_size" {
default = "BUILD_GENERAL1_SMALL"
}

variable "buildspec" {
default = ""
description = "Optional buildspec declaration to use for building the project"
}

0 comments on commit 141af4e

Please sign in to comment.