nobl9/terraform-provider-nobl9

OP condition attribute in Alert Policy

FelixBarsnickTS opened this issue · 2 comments

Hi Nobl9 team,

I am currently building SLOs transitioning from yaml to terraform.
Is the "op" attribute inside condition missing in the alert policy resource or is it just missing in the documentation?

Thanks for your help
Felix

Hey Felix!

The op attribute is currently not supported in .tf files because currently it is not needed.
Right now, the combination of measurement and op has only three possible values:

  • TimeToBurnBudget - LessThan
  • BurnedBudget - GreaterThanEqual
  • AverageBurnRate - GreaterThanEqual

Our API will reject any other combination. That is why, the nobl9 terraform provider picks the right op value for given measurement hence there is no option to provide the op.

You can find examples of alert_policy definitions in our tests - https://github.com/nobl9/terraform-provider-nobl9/blob/main/nobl9/resource_alert_policy_test.go#L62

I will make a case on our end to improve our docs for alert_policy resource.

Let me know if this solves your problem :)

Best, Krzysztof

Hi @kskitek

thank you very much for your response, I checked with our code and it looks good.
This solves my problems!

Best, Felix