From 84133bd2128ba6aede45547eacf3d706242926ea Mon Sep 17 00:00:00 2001 From: "Jocelyn Badgley (Twipped)" Date: Wed, 11 Aug 2021 10:20:45 -0700 Subject: [PATCH] Some small terraform updates --- terraform/lambda.tf | 36 +++++++++++++++--------------------- terraform/www.tf | 27 --------------------------- 2 files changed, 15 insertions(+), 48 deletions(-) diff --git a/terraform/lambda.tf b/terraform/lambda.tf index 1611c1c..b67197d 100644 --- a/terraform/lambda.tf +++ b/terraform/lambda.tf @@ -3,26 +3,23 @@ # ----------------------------------------------------------------------------------------------------------- # IAM Role for Redirect Lambda +data "aws_iam_policy_document" "lambda_redirect" { + statement { + actions = ["sts:AssumeRole"] + + principals { + type = "Service" + identifiers = [ + "edgelambda.amazonaws.com", + "lambda.amazonaws.com" + ] + } + } +} + resource "aws_iam_role" "lambda_redirect" { name = "${var.site}-lambda-redirect-role" - assume_role_policy = < - - -EOF -} - # ----------------------------------------------------------------------------------------------------------- # Cloudfront Configuration