Skip to content

Commit

Permalink
change log_bucket_versioning from bool to string
Browse files Browse the repository at this point in the history
  • Loading branch information
carterjones committed May 12, 2022
1 parent 3f945b5 commit 31f3a77
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module "terraform_state_bucket_logs" {
s3_bucket_name = local.logging_bucket
default_allow = false
s3_log_bucket_retention = var.log_retention
enable_versioning = var.log_bucket_versioning
versioning_status = var.log_bucket_versioning

tags = var.log_bucket_tags
}
Expand Down
10 changes: 7 additions & 3 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@ variable "log_name" {
}

variable "log_bucket_versioning" {
description = "Bool for toggling versioning for log bucket"
type = bool
default = false
description = "A string that indicates the versioning status for the log bucket."
default = "Disabled"
type = string
validation {
condition = contains(["Enabled", "Disabled", "Suspended"], var.log_bucket_versioning)
error_message = "Valid values for versioning_status are Enabled, Disabled, or Suspended."
}
}

variable "state_bucket_tags" {
Expand Down

0 comments on commit 31f3a77

Please sign in to comment.