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

Deployment fails with "MalformedPolicy: Policy has invalid resource" when used as part of terraform-aws-elastic-beanstalk-environment #81

Closed
benjamin-hg opened this issue Apr 26, 2024 · 1 comment · Fixed by #82
Labels
bug 🐛 An issue with the system

Comments

@benjamin-hg
Copy link
Contributor

Describe the Bug

I used this module as a transitive dependency of module terraform-aws-elastic-beanstalk-environment

The issue arises with enable_loadbalancer_logs = true

Deployment fails, because the EB's ELB does not get permissions to access the bucket.
This is caused by terraform failing to create the policy.
The policy creation fails because it is invalid.
The policy is invalid because a wrong bucket name is used as resource in some of the policy statements.

Expected Behavior

The created policy statements reference the bucket with the correct name

Steps to Reproduce

  1. Create a terraform-aws-elastic-beanstalk-environment
  2. Set enable_loadbalancer_logs = true in that module
  3. Try terraform apply

Screenshots

No response

Environment

No response

Additional Context

No response

@benjamin-hg benjamin-hg added the bug 🐛 An issue with the system label Apr 26, 2024
benjamin-hg added a commit to benjamin-hg/terraform-aws-lb-s3-bucket that referenced this issue Apr 26, 2024
…ce" when used as part of terraform-aws-elastic-beanstalk-environment cloudposse#81
@benjamin-hg
Copy link
Contributor Author

@Nuru Nuru closed this as completed in #82 May 3, 2024
benjamin-hg added a commit to benjamin-hg/terraform-aws-elastic-beanstalk-environment that referenced this issue May 15, 2024
joe-niland pushed a commit to cloudposse/terraform-aws-elastic-beanstalk-environment that referenced this issue May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant