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

aws_cloudwatch_log_group resource lookup returns multiple matches. #885

Open
so1omon563 opened this issue Mar 15, 2022 · 0 comments
Open

Comments

@so1omon563
Copy link
Contributor

Describe the problem

When running a check against a CloudWatch Log Group, I receive the error:

RuntimeError:
Found multiple CloudWatch Log Groups.

The log group I'm trying to check is named similarly to /my-environment/my-app. Not able to post the actual log group names due to confidentiality concerns.

The error reports that it finds the log group I want to check, but ALSO a log group named /my-environment/my-app-deploy.

I have been able to duplicate this error with other environments that have similar names.

I realize that this is the default behavior of the describe_log_groups api call, since it's actually doing a prefix lookup. But, since this is a singular resource, rather than a plural one, I would expect it to only return a match on the specific name.

Possible Solution

Add limit: 1 to the call doing the lookup by default to only return the first match.

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

No branches or pull requests

1 participant