terraform-provider-opsgenie
terraform-provider-opsgenie copied to clipboard
Notification Policy delay until_minute cannot be 0
Terraform Version
v0.14.2
Affected Resource(s)
- opsgenie_notification_policy
Terraform Configuration Files
resource "opsgenie_notification_policy" "delay-alerts-until-working-hours" {
name = "Delay alerts until working hours"
team_id = opsgenie_team.team.id
policy_description = "This policy is to ensure that alerts triggering outside of working hours will only alert during working hours."
filter {
type = "match-all"
}
delay_action {
delay_option = "next-weekday"
until_hour = var.working_hours_start
until_minute = var.working_hours_minute_start # This value cannot be 0, so we can't set 9:00
}
}
Expected Behavior
If we set the var.working_hours_start to be 9 and the var.working_hours_minute_start to be 0, we should have the alert policy to delay alerts until 9:00
Actual Behavior
This error message comes back from Opsgenie: Error: expected delay_action.0.until_minute to be in the range (1 - 59), got 0
Steps to Reproduce
- Create a opsgenie_notification_policy
- Create a delay_action block
- Set the until_minute to 0
- run
terraform plan# this will result in the error
Having this issue as well.
Terraform v0.15.1
on darwin_amd64
+ provider registry.terraform.io/hashicorp/google v3.73.0
+ provider registry.terraform.io/opsgenie/opsgenie v0.6.5
Any updates on this? Still a problem on provider 0.6.20
│ Error: expected delay_action.0.until_minute to be in the range (1 - 59), got 0
│
│ with opsgenie_notification_policy.policy_working_hours,
│ on policies.tf line 95, in resource "opsgenie_notification_policy" "policy_working_hours":
│ 95: until_minute = "00"
This should be closed as of: #379