Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the builtin Terraform behaviour for updating Lambdas #434

Merged
merged 1 commit into from
Jun 21, 2017
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
13 changes: 7 additions & 6 deletions terraform/lambda/lambda_function.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ data "archive_file" "lambda_zip_file" {
}

resource "aws_lambda_function" "lambda_function" {
description = "${var.description}"
filename = "${data.archive_file.lambda_zip_file.output_path}"
function_name = "${var.name}"
role = "${aws_iam_role.iam_role.arn}"
handler = "${var.name}.main"
runtime = "python3.6"
description = "${var.description}"
filename = "${data.archive_file.lambda_zip_file.output_path}"
function_name = "${var.name}"
role = "${aws_iam_role.iam_role.arn}"
handler = "${var.name}.main"
runtime = "python3.6"
source_code_hash = "${data.archive_file.lambda_zip_file.output_base64sha256}"

environment {
variables = "${var.environment_variables}"
Expand Down
4 changes: 0 additions & 4 deletions terraform/plan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ rm -rf releases
echo "Getting variables from S3"
aws s3 cp s3://platform-infra/terraform.tfvars .

# Check if any of our Lambda packages have changed and need to be tainted.
# Annoyingly there doesn't seem to be a way for Terraform to do this for us.
python taint_lambdas.py

# Download releases from S3
mkdir releases
aws s3 cp s3://platform-infra/releases releases --recursive
Expand Down
110 changes: 0 additions & 110 deletions terraform/taint_lambdas.py

This file was deleted.