diff --git a/README.md b/README.md index fc3389c..55b5c74 100644 --- a/README.md +++ b/README.md @@ -142,6 +142,7 @@ This module is composed of several submodules and each of which can be used inde | [allow\_users\_to\_change\_password](#input\_allow\_users\_to\_change\_password) | Whether to allow users to change their own password. | `bool` | no | | [analyzer\_baseline\_enabled](#input\_analyzer\_baseline\_enabled) | Boolean whether analyzer-baseline is enabled. | `bool` | no | | [analyzer\_name](#input\_analyzer\_name) | The name for the IAM Access Analyzer resource to be created. | `string` | no | +| [audit\_log\_bucket\_access\_logs\_name](#input\_audit\_log\_bucket\_access\_logs\_name) | The name of the S3 bucket to store various audit logs. | `string` | no | | [audit\_log\_bucket\_custom\_policy\_json](#input\_audit\_log\_bucket\_custom\_policy\_json) | Override policy for the audit log bucket. Allows addition of extra policies. | `string` | no | | [audit\_log\_bucket\_force\_destroy](#input\_audit\_log\_bucket\_force\_destroy) | A boolean that indicates all objects should be deleted from the audit log bucket so that the bucket can be destroyed without error. These objects are not recoverable. | `bool` | no | | [audit\_log\_bucket\_key\_enabled](#input\_audit\_log\_bucket\_key\_enabled) | Whether or not to use Amazon S3 Bucket Keys for encrypting the audit log bucket. | `bool` | no | diff --git a/bucket.tf b/bucket.tf index 2c6f30e..5d92b3d 100644 --- a/bucket.tf +++ b/bucket.tf @@ -36,7 +36,7 @@ module "audit_log_bucket" { bucket_name = var.audit_log_bucket_name bucket_key_enabled = var.audit_log_bucket_key_enabled - log_bucket_name = "${var.audit_log_bucket_name}-access-logs" + log_bucket_name = var.audit_log_bucket_access_logs_name != "" ? var.audit_log_bucket_access_logs_name : "${var.audit_log_bucket_name}-access-logs" lifecycle_glacier_transition_days = var.audit_log_lifecycle_glacier_transition_days force_destroy = var.audit_log_bucket_force_destroy diff --git a/variables.tf b/variables.tf index 4e7df2c..a942f3c 100644 --- a/variables.tf +++ b/variables.tf @@ -79,6 +79,12 @@ variable "audit_log_bucket_name" { type = string } +variable "audit_log_bucket_access_logs_name" { + description = "The name of the S3 bucket to store various audit logs." + type = string + default = "" +} + variable "audit_log_bucket_custom_policy_json" { description = "Override policy for the audit log bucket. Allows addition of extra policies." type = string