Skip to content

When fetch doesn't run policy message is not clear enough. #317

@yevgenypats

Description

@yevgenypats

Is your feature request related to a problem? Please describe.

Currently if I just run policy without running fetch it will give the following error:

Cloning Policy cloudquery-policies/aws
❌policy "cloudquery-policies-aws" -  error: aws/cis-v1.20/cis-v1.20/aws_log_metric_filter_and_al…  

📋 cloudquery-policies-aws Results:

❌ Policy failed to run
Error: aws/cis-v1.20/cis-v1.20/aws_log_metric_filter_and_alarm/aws_log_metric_filter_and_alarm_query: ERROR: relation "aws_cloudtrail_trails" does not exist (SQLSTATE 42P01)

A new user who is not familiar with what is fetch or how cloudquery works internally won't know how to resolve it. We need a way to check if fetch was run and if not, not run the policy and give the user an error and a next step.

You should first run `cloudquery fetch`
docs: https://docs.cloudquery.io/......

Describe the solution you'd like

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions