From 404e3b6fa5e2d0037a7bc8fe7674a887ab6504eb Mon Sep 17 00:00:00 2001 From: Shashi <84855788+shashidhar087@users.noreply.github.com> Date: Thu, 30 Jun 2022 11:41:59 -0400 Subject: [PATCH] fix: added server_side_encryption key to download trigger for distribution (#2207) * fix: added server_side_encryption key in resource aws_s3_object * fix: added server_side_encryption key in resource aws_s3_object --- .../runner-binaries-syncer.tf | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/runner-binaries-syncer/runner-binaries-syncer.tf b/modules/runner-binaries-syncer/runner-binaries-syncer.tf index b6d091de09..9289025043 100644 --- a/modules/runner-binaries-syncer/runner-binaries-syncer.tf +++ b/modules/runner-binaries-syncer/runner-binaries-syncer.tf @@ -134,13 +134,13 @@ resource "aws_lambda_permission" "syncer" { ################################################################################### resource "aws_s3_object" "trigger" { - bucket = aws_s3_bucket.action_dist.id - key = "triggers/${aws_lambda_function.syncer.id}-trigger.json" - source = "${path.module}/trigger.json" - etag = try(var.server_side_encryption_configuration.rule.apply_server_side_encryption_by_default.kms_master_key_id, null) == null ? filemd5("${path.module}/trigger.json") : null - kms_key_id = try(var.server_side_encryption_configuration.rule.apply_server_side_encryption_by_default.kms_master_key_id, null) - - depends_on = [aws_s3_bucket_notification.on_deploy] + bucket = aws_s3_bucket.action_dist.id + key = "triggers/${aws_lambda_function.syncer.id}-trigger.json" + source = "${path.module}/trigger.json" + etag = try(var.server_side_encryption_configuration.rule.apply_server_side_encryption_by_default.kms_master_key_id, null) == null ? filemd5("${path.module}/trigger.json") : null + kms_key_id = try(var.server_side_encryption_configuration.rule.apply_server_side_encryption_by_default.kms_master_key_id, null) + server_side_encryption = try(var.server_side_encryption_configuration.rule.apply_server_side_encryption_by_default.sse_algorithm, null) + depends_on = [aws_s3_bucket_notification.on_deploy] } resource "aws_s3_bucket_notification" "on_deploy" {