Last active
September 16, 2018 11:44
-
-
Save diogoaurelio/4c4ef99dfa87dd7fb1d9b6381909f217 to your computer and use it in GitHub Desktop.
lambda_module_instantiation.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module "redshift_loader_lambda" { | |
source = "github.com/diogoaurelio/terraform-aws-lambda-module" | |
version = "v0.0.1" | |
aws_region = "${var.aws_region}" | |
environment = "${var.environment}" | |
project = "${var.project}" | |
lambda_unique_function_name = "${var.redshift_loader_lambda_unique_function_name}" | |
runtime = "${var.redshift_loader_lambda_runtime}" | |
handler = "${var.redshift_loader_lambda_handler}" | |
lambda_iam_role_name = "${var.redshift_loader_lambda_role_name}" | |
main_lambda_file = "${var.redshift_loader_main_lambda_file}" | |
lambda_source_dir = "${local.redshift_loader_lambda_dir}/src" | |
lambda_zip_file_location = "${local.redshift_loader_lambda_dir}/${var.redshift_loader_main_lambda_file}.zip" | |
lambda_env_vars = "${local.redshift_loader_lambda_env_vars}" | |
additional_policy = "${data.aws_iam_policy_document.this.json}" | |
attach_policy = true | |
# configure Lambda function inside a specific VPC | |
security_group_ids = ["${aws_security_group.this.id}"] | |
subnet_ids = "${split(",", var.private_subnet_ids)}" | |
# DLQ | |
use_dead_letter_config_target_arn = true | |
dead_letter_config_target_arn = "${aws_sns_topic.lambda_sns_dql.arn}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment