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!