Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix invalid index error when eks_audit_logs_pipeline is disabled #4

Merged
merged 1 commit into from
Aug 9, 2024

Conversation

NolanT
Copy link
Contributor

@NolanT NolanT commented Aug 9, 2024

Disables the creation of the aws_s3_bucket_public_access_block and aws_s3_bucket_server_side_encryption_configuration when enable_eks_audit_logs_pipeline is set to false.

This fixes this error

╷
│ Error: Invalid index
│
│   on .rad-security-connect/eks_audit_logs.tf line 40, in resource "aws_s3_bucket_public_access_block" "audit_logs":
│   40:   bucket = aws_s3_bucket.audit_logs[0].id
│     ├────────────────
│     │ aws_s3_bucket.audit_logs is empty tuple
│
│ The given key does not identify an element in this collection value: the
│ collection has no elements.
╵
╷
│ Error: Invalid index
│
│   on .rad-security-connect/eks_audit_logs.tf line 49, in resource "aws_s3_bucket_server_side_encryption_configuration" "audit_logs":
│   49:   bucket = aws_s3_bucket.audit_logs[0].id
│     ├────────────────
│     │ aws_s3_bucket.audit_logs is empty tuple
│
│ The given key does not identify an element in this collection value: the
│ collection has no elements.
╵

@NolanT NolanT changed the title Fix invaid index error when eks_audit_logs_pipeline is disabled Fix invalid index error when eks_audit_logs_pipeline is disabled Aug 9, 2024
@jeffreyfriedman jeffreyfriedman merged commit b968480 into rad-security:main Aug 9, 2024
2 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