project id with context

Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>
This commit is contained in:
Raffaele Di Fazio 2024-08-05 21:53:37 +02:00
parent 015497e904
commit b5e6817ba4

View File

@ -144,7 +144,7 @@ func NewGoogleProvider(ctx context.Context, project string, domainFilter endpoin
} }
if project == "" { if project == "" {
mProject, mErr := metadata.ProjectID() mProject, mErr := metadata.ProjectIDWithContext(ctx)
if mErr != nil { if mErr != nil {
return nil, fmt.Errorf("failed to auto-detect the project id: %w", mErr) return nil, fmt.Errorf("failed to auto-detect the project id: %w", mErr)
} }