Difference between revisions of "Terraform resource: aws s3 bucket logging"

From wikieduonline
Jump to navigation Jump to search
Line 8: Line 8:
 
   target_prefix = "log/"
 
   target_prefix = "log/"
 
  }
 
  }
 +
 +
 +
=== Required Arguments ===
 +
 +
* <code>[[bucket]]</code>: Name of the S3 bucket you want to enable logging for.
 +
* <code>[[target_bucket]]</code>: Name of the bucket where you want to store the log data. This bucket needs to have appropriate permissions set to allow logging.
 +
* <code>[[target_prefix]]</code>: Prefix that will be added to the beginning of every log object key.
  
 
== Related ==
 
== Related ==

Revision as of 04:10, 17 June 2024


resource "aws_s3_bucket_logging" "example" {
 bucket = aws_s3_bucket.example.id

 target_bucket = aws_s3_bucket.log_bucket.id
 target_prefix = "log/"
}


Required Arguments

  • bucket: Name of the S3 bucket you want to enable logging for.
  • target_bucket: Name of the bucket where you want to store the log data. This bucket needs to have appropriate permissions set to allow logging.
  • target_prefix: Prefix that will be added to the beginning of every log object key.

Related

See also

Advertising: