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

fix: set kms key on aws_s3_object when encryption is enabled #2147

Merged
merged 2 commits into from
Jun 14, 2022
Merged
Changes from 1 commit
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
9 changes: 5 additions & 4 deletions modules/runner-binaries-syncer/runner-binaries-syncer.tf
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,11 @@ 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 = filemd5("${path.module}/trigger.json")
bucket = aws_s3_bucket.action_dist.id
key = "triggers/${aws_lambda_function.syncer.id}-trigger.json"
source = "${path.module}/trigger.json"
etag = lookup(var.server_side_encryption_configuration.rule.apply_server_side_encryption_by_default, "kms_master_key_id", null) == null ? filemd5("${path.module}/trigger.json") : null
julada marked this conversation as resolved.
Show resolved Hide resolved
kms_key_id = lookup(var.server_side_encryption_configuration.rule.apply_server_side_encryption_by_default, "kms_master_key_id", null)
julada marked this conversation as resolved.
Show resolved Hide resolved

depends_on = [aws_s3_bucket_notification.on_deploy]
}
Expand Down