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

Cryptic error when a recording rule doesn't pass the check enforced by strict_recording_rule_check #24

Open
mlcdf opened this issue Feb 28, 2024 · 0 comments

Comments

@mlcdf
Copy link
Member

mlcdf commented Feb 28, 2024

Hi there,

Terraform Version

1.2.6

Affected Resource(s)

  • mimirtool_ruler_namespace

Terraform Configuration Files

resource "mimirtool_ruler_namespace" "rules" {
 namespace                   = "rules"
 config_yaml                 = file("rules/rules.yaml")
 strict_recording_rule_check = true
}
    - record: http_request_duration_seconds_count:rate5m
      expr: sum by (job, code) (http_request_duration_seconds_count)

Expected Behavior

What should have happened?

A detailed error message like this log line: https://github.com/grafana/mimir/blob/b85cdae798f0da739497ef04c34497bb99e4a760/pkg/mimirtool/rules/rules.go#L99

And a suggestion that this check can be disable by removing strict_recording_rule_check = true.

Actual Behavior

Only this error message in terraform:

╷
│ Error: namespace contains 1 rules that don't match the requirements
│ 
│   with mimirtool_ruler_namespace.rules,
│   on main.tf line 16, in resource "mimirtool_ruler_namespace" "rules":
│   16: resource "mimirtool_ruler_namespace" "rules" {
│ 
╵
Executing post-apply hook...
Operation failed: failed running terraform apply (exit 1)�

Which is pretty cryptic.

Steps to Reproduce

cf the configuration file above and then, run terraform apply

domtes-form3 pushed a commit to domtes-form3/terraform-provider-mimirtool that referenced this issue Feb 29, 2024
…corp/setup-terraform-3

Bump hashicorp/setup-terraform from 2 to 3
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