https://pulumi.com logo
#general
Title
# general
d

dazzling-scientist-80826

06/27/2019, 11:02 PM
i’m trying to do
aws.cloudwatch.LogGroup.get(name, logGroupName)
where
logGroupName
is a computed value like
/aws/lambda/${lambda.name}
- this works, but if there were no log messages written by the lambda yet (ie on an initial deploy) subsequent resource creations that reference the log group fail with
The specified log group does not exist
- any recommendations on how to solve this chicken and egg problem?
in particularly, i’m trying to create a
aws.cloudwatch.LogSubscriptionFilter
w

white-balloon-205

06/28/2019, 3:45 AM
Yeah - this is a somewhat unfortunate thing with Lambda - it lazily creates the LogGroup using a well known name when there are first logs. I believe I’ve had success in the past creating the loggroup with the same name explicitly prior to the lambda - which will then reuse that loggroup. You can the refer to it from other resources.
2 Views