Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ CodeBuild job to deploy it.
| ------------------------- | --------------------------------------------------------------------------| ------------ |
| github_url | GitHub URL of function or layer code. Enables CodeBuild. Assumes buildspec.yml at root of repo. Requires github_token_ssm_param | "" |
| codebuild_credential_arn | AWS Codebuild source credential for accessing github | "" |
| build_timeout | Codebuild Timeout in minutes. | "60" |

### lambda_function
Many of the module arguments map directly to the [aws_lambda_function](https://www.terraform.io/docs/providers/aws/r/lambda_function.html) resource arguments:
Expand Down
2 changes: 1 addition & 1 deletion lambda_function/ci.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ resource "aws_codebuild_project" "lambda" {
count = var.github_url == "" ? 0 : 1

name = var.function_name
build_timeout = "5"
build_timeout = var.build_timeout
service_role = aws_iam_role.codebuild[0].arn

artifacts {
Expand Down
11 changes: 8 additions & 3 deletions lambda_function/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,21 @@ variable "reserved_concurrent_executions" {
}

variable "github_url" {
type = string
type = string
default = ""
}

variable "layers" {
type = list(string)
type = list(string)
default = []
}

variable "codebuild_credential_arn" {
type = string
default = ""
}
}

variable "build_timeout" {
type = string
default = "60"
}
2 changes: 1 addition & 1 deletion lambda_layer/ci.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ resource "aws_codebuild_project" "lambda" {
count = var.github_url == "" ? 0 : 1

name = var.layer_name
build_timeout = "5"
build_timeout = var.build_timeout
service_role = aws_iam_role.codebuild[0].arn

artifacts {
Expand Down
5 changes: 5 additions & 0 deletions lambda_layer/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,8 @@ variable "codebuild_credential_arn" {
type = string
default = ""
}

variable "build_timeout" {
type = string
default = "60"
}