This repository contains Terraform modules for configuring OCI Logging to capture and manage logs for various OCI services, sepcifically for Object Storage bucket access logs.
Use this module to:
- Create Log Groups to organzie logs
- Enable Bucket Access Logs to track read and write operations
- Define log definitions to control what should be logged and the log storage duration
Ensure you have the following before using this module:
- OpenTofu or Terraform installed
- An Oracle Cloud Infrastruture(OCI) Account
- Configure OCI CLI with appropriate credentials
- Required IAM Policies
This module is compatible with OpenTofu. To use Terraform instead of OpenTofu, ensure you have Terraform installed and use the following provider configuration:
terraform {
required_providers {
oci = {
source = "oracle/oci"
version = ">= 6.31.0"
}
}
}
-
Use
terraform.tfvars
FileThe repository includes a terraform.tfvars.example file. Edit it and replace the placeholder values with your actual OCI credentials, to create your own terraform.tfvars file.
-
To deploy the resources, initialize and apply the configuration:
tofu init # or terraform init
tofu plan # or terraform plan
tofu apply # or terraform apply
To destroy the created resources, use:
tofu destroy # or terraform destroy
This project is licensed under the MIT License - see the LICENSE file for details.