Skip to content

Unable to disable logging #265

Open
Open
@syphernl

Description

Describe the Bug

We'd like to disable logging for a particular env, but it seems this doesn't work.

  s3_access_logging_enabled	= false  
  cloudfront_access_log_create_bucket	= false

Results in:

│ Error: Failed getting S3 bucket (): InvalidParameter: 1 validation error(s) found.
│ - minimum field size of 1, HeadBucketInput.Bucket.
│ 
│ 
│   with module.cloudfront.data.aws_s3_bucket.cf_logs[0],
│   on .terraform/modules/cloudfront/main.tf line 363, in data "aws_s3_bucket" "cf_logs":
│  363: data "aws_s3_bucket" "cf_logs" {

Expected Behavior

Logging to be disabled without any errors.

Steps to Reproduce

  • Disable the logs with s3_access_logging_enabled = false and cloudfront_access_log_create_bucket = false
  • See the error

Screenshots

No response

Environment

  • Terraform v1.4.4
  • Module v0.88.0

Additional Context

No response

Metadata

Assignees

No one assigned

    Labels

    bug🐛 An issue with the system

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions