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

Custom 'AWS::Logs::LogGroup' resources not properly created #326

Open
bananastalktome opened this issue Apr 18, 2024 · 0 comments
Open

Custom 'AWS::Logs::LogGroup' resources not properly created #326

bananastalktome opened this issue Apr 18, 2024 · 0 comments
Labels

Comments

@bananastalktome
Copy link

bananastalktome commented Apr 18, 2024

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave "+1" or "me too" comments. They generate extra noise for issue followers and do not help prioritize the request.

Tell us about your request
We are experiencing a problem where 'AWS::Logs::LogGroup' resources defined in ebextensions are not properly created as 'Resoures' when an ElasticBeanstalk environment is started. The problem is expreienced when bringing up an environment as a Ruby 3.2 with the latest platform version, but has been occurring with the Ruby platforms for some time now. I downloaded the example ruby app from "https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/tutorials.html ", added the following in an ebextension, and zipped it up using zip ../ruby.zip -r * .[^.]* to upload via the AWS Dashboard. Here is the full ebextension for the test scenario:

Resources:
  CustomLogGroupOne:
    Type: "AWS::Logs::LogGroup"
    DeletionPolicy: "Delete"
    UpdateReplacePolicy: "Delete"
    Properties:
      RetentionInDays: 1
      LogGroupName: "/custom/customLogGroup"

The log group is properly created when the environment launches, with the proper 1 day retention policy, however unexpectedly it is not all created as a Resource. When viewing the CloudFormation template created by ElasticBeanstalk. In the generated CloudFormation template, we see the following instead:

"Parameters":{"CustomLogGroupOne":{"NoEcho":"true","Type":"String","Default":"\/custom\/customLogGroup"}

Is this request specific to an Elastic Beanstalk platform?
If so, which one(s)?
Tried on Ruby 3.2 AL2023 v4.0.5, but the issue has been happening for a couple years and through several versions.

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
We are trying to create custom log groups that will be properly removed when the environment is terminated. The (unexpected) behavior we see is that the DeletionPolicy is not used.

Are you currently working around this issue?
A complicated system of lambdas and CustomResources could be used, but we have not done so.

Additional context
Anything else we should know?

Attachments
If you think you might have additional information that you'd like to include via an attachment, please do - we'll take a look. (Remember to remove any personally-identifiable information.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant