Skip to content

Commit

Permalink
Only set aws_s3_object SSE and ACL if not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
rifelpet committed Sep 13, 2024
1 parent f1a182e commit 1c9756a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions util/pkg/vfs/s3fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -743,10 +743,14 @@ func (p *S3Path) RenderTerraform(w *terraformWriter.TerraformWriter, name string
Bucket: p.Bucket(),
Key: p.Key(),
Content: content,
SSE: &sseVal,
Acl: &aclVal,
Provider: terraformWriter.LiteralTokens("aws", "files"),
}
if sseVal != "" {
tf.SSE = &sseVal
}
if aclVal != "" {
tf.Acl = &aclVal
}
return w.RenderResource("aws_s3_object", name, tf)
}

Expand Down

0 comments on commit 1c9756a

Please sign in to comment.