File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,10 @@ region = "us-east-1"
6060| Name | Description | Type | Default | Required |
6161| ------| -------------| :----:| :-----:| :-----:|
6262| allowed\_ account\_ ids | Account IDs that are allowed to access the bucket/KMS key | list(string) | ` [] ` | no |
63- | bucket | Name of bucket to create \( do not provide if using ` remote\_bucket ` \) | string | ` "" ` | no |
63+ | bucket | Name of bucket to create \( do not provide if using ` remote_bucket ` \) | string | ` "" ` | no |
6464| kms\_ key\_ id | ARN for KMS key for all encryption operations. | string | ` "" ` | no |
65+ | logging\_ target\_ bucket | The name of the bucket that will receive the log objects | string | ` var.bucket ` | no |
66+ | logging\_ target\_ prefix | A key prefix for log objects | string | ` "TFStateLogs/" ` | no |
6567| region | Region bucket will be created in | string | n/a | yes |
6668| remote\_ bucket | If specified, the remote bucket will be used for the backend. A new bucket will not be created | string | ` "" ` | no |
6769| table | Name of Dynamo Table to create | string | ` "tf-locktable" ` | no |
Original file line number Diff line number Diff line change @@ -49,8 +49,8 @@ resource "aws_s3_bucket" "this" {
4949 }
5050
5151 logging {
52- target_bucket = var. bucket
53- target_prefix = " TFStateLogs/ "
52+ target_bucket = coalesce ( var. logging_target_bucket , var . bucket )
53+ target_prefix = var . logging_target_prefix
5454 }
5555}
5656
Original file line number Diff line number Diff line change @@ -16,6 +16,18 @@ variable "kms_key_id" {
1616 type = string
1717}
1818
19+ variable "logging_target_bucket" {
20+ default = null
21+ description = " The name of the bucket that will receive the log objects"
22+ type = string
23+ }
24+
25+ variable "logging_target_prefix" {
26+ default = " TFStateLogs/"
27+ description = " A key prefix for log objects"
28+ type = string
29+ }
30+
1931variable "region" {
2032 description = " Region bucket will be created in"
2133 type = string
You can’t perform that action at this time.
0 commit comments