GCP Monitoring SLO in Terraform Bug?

https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/monitoring_slo

I’m trying to create a google_monitoring_slo resource within GCP via Terraform and as per the documentation (link above), it states that the range block which consists of min and max will always default to Infinity if let blank as well as they’re both optional.

I currently want to specify a min of 1440 and a max of infinity - so as per the docs, i could leave max blank. Doing this returns the following error message when running Terraform Deploy

│ Error: Error creating Slo: googleapi: Error 400: The minimum of the range in a MetricSumInRange must be less than its maximum. Got a minimum of 1440.0 and a maximum of 0.0

I’ve created the resource via GCP console and viewed the JSON version of it - and it specifies the following
"range": { "min": 1440, "max": "Infinity" }
I’ve tried passing through max="Infinity" but i shortly get a failure, stating that max must be an integer, not a string. I then tried passing a large number 999 million as the max value, which worked. I just want to have infinity and i feel like the docs are suggesting something that i’ve tried. Do you have any idea how i can get over this?

Thank you!

Try passing none or -1

Or try setting it to ">= range.min"

Thanks for your response! I tried setting MAX to -1 but got the same 400 error unfortunately

Error: Error creating Slo: googleapi: Error 400: The minimum of the range in a MetricSumInRange must be less than its maximum. Got a minimum of 1440.0 and a maximum of -1.0

I also tried setting MAX to “>= range.min” and had the following error

│ 73: max = ">= range.min" │ │ Inappropriate value for attribute "max": a number is required.

Have you tried not including it at all?

range {
    min = 1440
} 

I’ve tried that too and get a 400 error in response stating the MAX cant be lower than the MIN - the max defaults to 0 when left undeclared.