BACKWARDS INCOMPATIBILITIES / NOTES:
- This module is now compatible with Terraform 1.3 and higher.
- This module is now compatible with the Terraform AWS provider 4.22 and higher.
- The
lambda_assume_rolevar is now calledlambda_assume_role_policy_document. - The
lambda_execution_policyvar is now calledlambda_execution_role_policy_document. - The
account_idvar has been removed and the current account is instead determined from a data resource. - The
publishvar now accepts a boolean value rather than a "yes"/"no". - The
deploy_in_vpcvar now accepts a boolean value rather than a "yes"/"no", has been renamed toinclude_vpc_accessand defaults to false.
IMPROVEMENTS
-
Added support for using a container instead of a zip file to specify the lambda function, via the
lambda_package_typevariable, which defaults to"Zip", thelambda_image_urivariable and thelambda_image_configvariable.When
lambda_package_typeis"Image",lambda_image_urimust be specified andlambda_zip_path,lambda_handlerandlambda_runtimeshould not be specified. -
The execution role created for use by the lambda function no longer includes a statement for VPC access management unless
include_vpc_accessistrue. -
The execution role statements for VPC access management and log management can now be disabled using the variables
include_execution_role_policy_vpc_access_management_statementandinclude_execution_role_policy_log_management_statement. -
The target lambda architectures can now be provided to the lambda using the
lambda_architecturesvariable. -
Tracing configuration for the lambda can now be specified using the
lambda_tracing_configvariable, and a corresponding tracing execution role statement is added to the role when this variable is present. -
Logging configuration for the lambda can now be specified using the
lambda_logging_configvariable. -
A log group is now created for the lambda unless the
include_lambda_log_groupvariable is false. This log group is configured as the log destination for the lambda unless thelambda_logging_configvariable includes alog_groupparameter, referring to a log group name, in which case the provided log group is used.
BACKWARDS INCOMPATIBILITIES / NOTES:
- This module is now compatible with Terraform 0.14 and higher.
IMPROVEMENTS:
-
Added a new
deploy_in_vpcflag to disable VPC deployments.This enables the lambda to be used more easily when you want to access global AWS Services without having to configure a VPC or routing. To avoid breaking changes, the default mode is to deploy inside a VPC environment.
When
deploy_in_vpcis set to "no", thesg_lambdasecurity_group is not created and thevpc_configis passed empty values to create an AWS Lambda outside a VPC. -
Added
tagsinput to tag terraform managed resourcesA map of AWS tags can now be passed in via the
tagsinput variable. The default tags are:{ "Component": "<component>", "DeploymentIdentifier": "<deployment_identifier>" } -
Removed the hard-coded AWS region and AWS account ID's in
lambda_execution_policy. -
Added
include_route53_zone_association = "no"to test prerequisites to simplify test harness deployment -
Added
"ec2:AssignPrivateIpAddresses", "ec2:UnassignPrivateIpAddresses"to default execution policy to bring it inline with Amazon's default AWSLambdaVPCAccessExecutionRole. -
Added an optional
lambda_descriptionvariable. -
Added descriptions to variables for improved IDE code hints.