From f88b7eb9845d3383fd76db402e2bf54f503012dc Mon Sep 17 00:00:00 2001 From: badra001 Date: Tue, 2 Jan 2024 13:06:58 -0500 Subject: [PATCH] add access_log_bucket --- s3-config-org/README.md | 6 +++++- s3-config-org/main.tf | 4 +++- s3-config-org/variables.tf | 11 +++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/s3-config-org/README.md b/s3-config-org/README.md index 545ca1b..38f3812 100644 --- a/s3-config-org/README.md +++ b/s3-config-org/README.md @@ -67,8 +67,10 @@ This set up the needed components for an organization-use S3 config bucket. Thi Here is a simple example, the one most commonly expected to be used. ```hcl -module "config" { +module "config_org" { source = "git@github.e.it.census.gov:terraform-modules/aws-inf-setup.git//s3-config-org" + + access_log_bucket = "my-access-log-bucket" } ``` @@ -120,6 +122,8 @@ No modules. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| +| [access\_log\_bucket](#input\_access\_log\_bucket) | Server Access Logging Bucket ID | `string` | n/a | yes | +| [access\_log\_bucket\_prefix](#input\_access\_log\_bucket\_prefix) | Server Access Log bucket prefix, to which the Object Logging bucket name will be appended to make the target\_prefix | `string` | `"s3"` | no | | [account\_alias](#input\_account\_alias) | AWS Account Alias | `string` | `""` | no | | [account\_id](#input\_account\_id) | AWS Account ID (default will pull from current user) | `string` | `""` | no | | [bucket\_name](#input\_bucket\_name) | Organization Config S3 bucket name | `string` | `null` | no | diff --git a/s3-config-org/main.tf b/s3-config-org/main.tf index 4e7f5c0..53f9b87 100644 --- a/s3-config-org/main.tf +++ b/s3-config-org/main.tf @@ -9,8 +9,10 @@ * Here is a simple example, the one most commonly expected to be used. * * ```hcl -* module "config" { +* module "config_org" { * source = "git@github.e.it.census.gov:terraform-modules/aws-inf-setup.git//s3-config-org" +* +* access_log_bucket = "my-access-log-bucket" * } * ``` * diff --git a/s3-config-org/variables.tf b/s3-config-org/variables.tf index 2e5c126..94ebf5e 100644 --- a/s3-config-org/variables.tf +++ b/s3-config-org/variables.tf @@ -15,3 +15,14 @@ variable "component_tags" { type = map(map(string)) default = { "s3" = {}, "kms" = {}, } } + +variable "access_log_bucket" { + description = "Server Access Logging Bucket ID" + type = string +} + +variable "access_log_bucket_prefix" { + description = "Server Access Log bucket prefix, to which the Object Logging bucket name will be appended to make the target_prefix" + type = string + default = "s3" +}