Skip to content

Commit

Permalink
fix: updated S3 resource as per AWS 4.0 version
Browse files Browse the repository at this point in the history
  • Loading branch information
shashidhar087 committed Mar 4, 2022
1 parent 6e891cc commit a1564c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/runner-binaries-syncer/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ resource "aws_s3_bucket_lifecycle_configuration" "bucket-config" {

resource "aws_s3_bucket_server_side_encryption_configuration" "action_dist" {
bucket = aws_s3_bucket.action_dist.id

count = length(keys(lookup(var.server_side_encryption_configuration, "rule", {}))) == 0 ? 0 : 1

dynamic "rule" {
for_each = length(keys(lookup(var.server_side_encryption_configuration, "rule", {}))) == 0 ? [] : [lookup(var.server_side_encryption_configuration, "rule", {})]
for_each = [lookup(var.server_side_encryption_configuration, "rule", {})]

content {
bucket_key_enabled = lookup(rule.value, "bucket_key_enabled", null)
Expand Down

0 comments on commit a1564c0

Please sign in to comment.