Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions infrastructure/terraform/modules/s3bucket/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
| <a name="input_bucket_notification_depends_on"></a> [bucket\_notification\_depends\_on](#input\_bucket\_notification\_depends\_on) | Bucket notification explicit dependencies for depends\_on meta | `list(any)` | `[]` | no |
| <a name="input_component"></a> [component](#input\_component) | The name of the tfscaffold component | `string` | n/a | yes |
| <a name="input_default_tags"></a> [default\_tags](#input\_default\_tags) | A map of default tags to apply to all taggable resources within the component | `map(string)` | `{}` | no |
| <a name="input_enable_abac"></a> [enable\_abac](#input\_enable\_abac) | Toggle for enabling ABAC on the bucket. Defaults to false | `bool` | `false` | no |
| <a name="input_environment"></a> [environment](#input\_environment) | The name of the tfscaffold environment | `string` | n/a | yes |
| <a name="input_force_destroy"></a> [force\_destroy](#input\_force\_destroy) | Boolean to toggle force destroy of bucket. Defaults to true; should be changed in exceptional circumstances | `bool` | `true` | no |
| <a name="input_kms_key_arn"></a> [kms\_key\_arn](#input\_kms\_key\_arn) | ARN of default encryption KMS key for this bucket. If omitted, will use AES256 | `string` | `null` | no |
Expand Down
8 changes: 8 additions & 0 deletions infrastructure/terraform/modules/s3bucket/s3_bucket_abac.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
resource "aws_s3_bucket_abac" "main" {
count = var.enable_abac ? 1 : 0
bucket = aws_s3_bucket.main.bucket

abac_status {
status = "Enabled"
}
}
6 changes: 6 additions & 0 deletions infrastructure/terraform/modules/s3bucket/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,9 @@ variable "object_ownership" {
description = "Ownership of objects written to the bucket"
default = "BucketOwnerEnforced"
}

variable "enable_abac" {
type = bool
description = "Toggle for enabling ABAC on the bucket. Defaults to false"
default = false
}