Skip to content

Latest commit

 

History

History
72 lines (61 loc) · 8.33 KB

MODULE.md

File metadata and controls

72 lines (61 loc) · 8.33 KB

Requirements

No requirements.

Providers

Name Version
archive 2.2.0
aws 3.62.0
random 3.1.0

Modules

Name Source Version
trigger_http ./triggers/http n/a
trigger_rest ./triggers/rest n/a
trigger_s3 ./triggers/s3 n/a

Resources

Name Type
aws_cloudwatch_log_group.lambda_log_group resource
aws_cloudwatch_metric_alarm.errors_count_alarm resource
aws_iam_policy.function_policy resource
aws_iam_role.function_role resource
aws_iam_role_policy.function_logging_policy resource
aws_iam_role_policy_attachment.function_policy_attach resource
aws_iam_role_policy_attachment.vpc_policy_attachment resource
aws_iam_role_policy_attachment.xray_policy_attachment resource
aws_lambda_function.function resource
aws_s3_bucket.lambda_bucket resource
aws_s3_bucket_object.lambda_zip resource
aws_security_group.lambda_security_group resource
random_integer.bucket_salt resource
archive_file.files data source
aws_caller_identity.current data source
aws_iam_policy.vpc_access_policy data source
aws_iam_policy.xray_enable_policy data source
aws_region.current data source

Inputs

Name Description Type Default Required
alarm_topic Topic for alarms notification string null no
architecture The platform architecture, valid values are x86_64 and arm64. Default x86_64. string "x86_64" no
concurrent_execution Amount of reserved concurrent executions for this lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations. Defaults to Unreserved Concurrency Limits -1 number -1 no
environment_variables Map of environment variables that are accessible from the function code during execution. map(string) {} no
exclude_files Files list to exclude from the zip list(string) [] no
iam_policies List of IAM policy for the lambda
list(object({
actions = list(string),
resources = list(string)
}))
[] no
lambda_handler The entrypoint of the lambda application, with the fully qualify name of the method, for example src/main.handler. string n/a yes
lambda_name The lambda name and anything else. string n/a yes
lambda_runtime The lambda runtime engine, see @https://docs.aws.amazon.com/lambda/latest/dg/API_CreateFunction.html#SSS-CreateFunction-request-Runtime. string n/a yes
log_retention The cloudwatch log retention. Default 90. number 90 no
memory_size Amount of memory in MB your Lambda Function can use at runtime. Valid values are 128, 256, 512, 1024, 2048. Defaults to 128. number 128 no
source_dir Source of the lambda code, it can be a simple directory or an already zipped one. Default src. string "src" no
stage_name n/a string "api" no
timeout Amount of time your Lambda Function has to run in seconds. Defaults to 5. number 5 no
tracing_mode The XRAY service integration. It can be Active or PassThrough. Default disabled. string null no
trigger Trigger object variable. It can specify sqs, apigateway with route and authorizer, sqs or s3 trigger.
object({
s3 : optional(object({
bucket : string,
events : list(string),
filter_prefix : string,
filter_suffix : string
}))
apigateway : optional(object({
type : string,
existing_api_id : optional(string)
disable_test_endpoint : optional(bool)
resource_policy : optional(string)
cors_configuration : optional(object({
allow_headers : set(string)
allow_method : set(string)
allow_origins : set(string)
max_age : number
}))
authorizer : optional(object({
name : string,
identity_source : string,
jwt : optional(object({
aud : list(string),
issuer : string
}))
}))
routes : list(object({
path : string,
method : string,
authorizer : optional(bool)
}))
}))
#TODO alb trigger objejct
alb : optional(string)

})
null no
vpc_mode Use it to enable Lambda to run in VPC. Default disabled.
object({
id : string,
subnet_ids : list(string)
security_group = optional(object({
ingress = optional(list(object({
from_port = number
to_port = number
protocol = string
cidr_blocks = optional(list(string))
security_groups = optional(list(string))
})))
egress = optional(list(object({
from_port = number
to_port = number
protocol = string
cidr_blocks = optional(list(string))
security_groups = optional(list(string))
})))
}))
})
null no

Outputs

Name Description
lambda n/a