Skip to content

Conversation

@erastusndico
Copy link
Contributor

No description provided.

@erastusndico erastusndico requested a review from a team as a code owner October 21, 2025 08:06
Copilot AI review requested due to automatic review settings October 21, 2025 08:06
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes S3 access logging configuration by addressing conflicts between object lock and logging target functionality, and adds necessary IAM policies for S3 logging service access.

  • Disables object lock for buckets serving as logging targets (incompatible AWS feature combination)
  • Adds IAM policy permissions for S3 logging service to access audit log buckets
  • Corrects resource naming and references for S3 bucket ACL configuration

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
aws/modules/s3/variables.tf Adds is_logging_target variable to identify logging destination buckets
aws/modules/s3/main.tf Conditionally disables object lock for logging targets and sets appropriate ownership controls
aws/prod-infra/prod/s3.tf Configures audit logs bucket as logging target, fixes ACL resource name and bucket reference
aws/prod-infra/prod/s3-policy.tf Adds S3 logging service permissions and source restrictions
aws/non-prod-infra/staging/s3.tf Mirrors prod configuration for staging environment
aws/non-prod-infra/staging/s3-policy.tf Mirrors prod policy configuration for staging environment
aws/non-prod-infra/dev/s3.tf Mirrors prod configuration for dev environment with lifecycle adjustment
aws/non-prod-infra/dev/s3-policy.tf Mirrors prod policy configuration for dev environment
.pre-commit-config.yaml Updates checkov version from 3.2.483 to 3.2.484
Comments suppressed due to low confidence (1)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +118 to 120
enable_object_lock = false
object_lock_mode = "GOVERNANCE"
object_lock_retention_days = 30
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Object lock configuration parameters (object_lock_mode and object_lock_retention_days) are specified but enable_object_lock is set to false. These parameters will have no effect and should be removed or the configuration should be updated to conditionally omit them when object lock is disabled.

Copilot uses AI. Check for mistakes.
Comment on lines +118 to 120
enable_object_lock = false
object_lock_mode = "GOVERNANCE"
object_lock_retention_days = 30
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Object lock configuration parameters (object_lock_mode and object_lock_retention_days) are specified but enable_object_lock is set to false. These parameters will have no effect and should be removed or the configuration should be updated to conditionally omit them when object lock is disabled.

Copilot uses AI. Check for mistakes.
@erastusndico erastusndico merged commit 031f93f into main Oct 21, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants