From f46c665266b529619bfb38dd493746dc7c27fb79 Mon Sep 17 00:00:00 2001 From: Rohan Weeden Date: Wed, 8 May 2024 17:51:30 -0400 Subject: [PATCH 1/2] Add DAR=YES tag to lambda source bucket --- terraform/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/main.tf b/terraform/main.tf index a74afb3d..d6cdc4ea 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -19,7 +19,7 @@ resource "aws_security_group" "egress_lambda" { } resource "aws_s3_bucket" "lambda_source" { - tags = var.tags + tags = merge(var.tags, { DAR = "YES" }) } resource "aws_s3_bucket_object" "lambda_source" { From ef8b121aad4250dc221ad7ea2f6d9461fce02e26 Mon Sep 17 00:00:00 2001 From: Rohan Weeden Date: Wed, 8 May 2024 17:51:50 -0400 Subject: [PATCH 2/2] Run terraform fmt --- terraform/main.tf | 8 ++++---- terraform/variables.tf | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/terraform/main.tf b/terraform/main.tf index d6cdc4ea..dc2ef340 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -1,8 +1,8 @@ locals { - vpc_security_group_ids_set = length(var.vpc_security_group_ids) > 0 + vpc_security_group_ids_set = length(var.vpc_security_group_ids) > 0 cloudformation_template_filename = "${path.module}/thin-egress-app.yaml" - lambda_source_filename = "${path.module}/lambda.zip" - dependency_layer_filename ="${path.module}/dependencylayer.zip" + lambda_source_filename = "${path.module}/lambda.zip" + dependency_layer_filename = "${path.module}/dependencylayer.zip" } resource "aws_security_group" "egress_lambda" { @@ -44,7 +44,7 @@ resource "aws_s3_bucket_object" "cloudformation_template" { } resource "aws_cloudformation_stack" "thin_egress_app" { - depends_on = [ + depends_on = [ aws_s3_bucket_object.lambda_source, aws_s3_bucket_object.lambda_code_dependency_archive, aws_s3_bucket_object.cloudformation_template diff --git a/terraform/variables.tf b/terraform/variables.tf index 9ea7f503..5d412a78 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -193,8 +193,8 @@ variable "vpc_subnet_ids" { description = "Optional list of Subnets for the Lambda function." } -variable "use_cors"{ - type = bool - default = false +variable "use_cors" { + type = bool + default = false description = "Enable cross origin resource sharing" }