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

Allow user to enable S3 Transfer Acceleration #98

Merged
merged 4 commits into from
Jul 20, 2021
Merged
Show file tree
Hide file tree
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
11 changes: 6 additions & 5 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ resource "aws_s3_bucket" "default" {
#bridgecrew:skip=CKV_AWS_52:Skipping `Ensure S3 bucket has MFA delete enabled` due to issue in terraform (https://github.com/hashicorp/terraform-provider-aws/issues/629).
#bridgecrew:skip=BC_AWS_S3_16:Skipping `Ensure S3 bucket versioning is enabled` because dynamic blocks are not supported by checkov
#bridgecrew:skip=BC_AWS_S3_14:Skipping `Ensure all data stored in the S3 bucket is securely encrypted at rest` because variables are not understood
count = local.enabled ? 1 : 0
bucket = local.bucket_name
acl = try(length(var.grants), 0) == 0 ? var.acl : null
force_destroy = var.force_destroy
tags = module.this.tags
count = local.enabled ? 1 : 0
alexjurkiewicz marked this conversation as resolved.
Show resolved Hide resolved
bucket = local.bucket_name
acl = try(length(var.grants), 0) == 0 ? var.acl : null
force_destroy = var.force_destroy
tags = module.this.tags
acceleration_status = var.transfer_acceleration_enabled ? "Enabled" : null

versioning {
enabled = var.versioning_enabled
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -272,3 +272,9 @@ variable "privileged_principal_actions" {
default = []
description = "List of actions to permit `privileged_principal_arns` to perform on bucket and bucket prefixes (see `privileged_principal_arns`)"
}

variable "transfer_acceleration_enabled" {
type = bool
default = false
description = "Set this to true to enable S3 Transfer Acceleration for the bucket."
}