Skip to content

Fix S3 bucket force_destroy logic, add existing bucket management, and bucket integration tests - #5

Merged
sachin-sumologic merged 2 commits into
fy27q2from
test
Aug 7, 2026
Merged

Fix S3 bucket force_destroy logic, add existing bucket management, and bucket integration tests#5
sachin-sumologic merged 2 commits into
fy27q2from
test

Conversation

@sachin-sumologic

Copy link
Copy Markdown

Fix S3 bucket force_destroy logic and add existing bucket management

  • Fix common_force_destroy: changed from OR to AND so only active sources
    determine the bucket's force_destroy setting. Previously, disabled sources'
    default (true) overrode an active source's explicit false, causing unintended
    bucket deletion on terraform destroy.

  • Add existing bucket support: when create_bucket=false, the module now reads
    the existing bucket's policy, appends required service principals (preserving
    customer statements), and configures S3→SNS notifications.

  • Add bucket integration tests covering retention on destroy, force-destroy
    cleanup, shared bucket with mixed force_destroy settings, existing bucket
    policy append, and multi-source existing bucket scenarios.

@sachin-sumologic
sachin-sumologic changed the base branch from master to fy27q2 August 7, 2026 10:17
@sachin-sumologic
sachin-sumologic requested a review from a team as a code owner August 7, 2026 10:17
@sachin-sumologic
sachin-sumologic merged commit 72f47b6 into fy27q2 Aug 7, 2026
2 checks passed
sachin-sumologic added a commit that referenced this pull request Aug 7, 2026
…ment, and bucket integration tests (#5)"

This reverts commit 72f47b6.
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