Planning failed. Terraform encountered an error while generating this plan.
╷
│ Error: expected schedule.0.monthly_occurrence.0.occurrence to be in the range (1 - 5), got -1
│
│ with module.automationAccount.azurerm_automation_software_update_configuration.ScheduleWindows["Windows-Automation"],
│ on main.tf line 149, in resource "azurerm_automation_software_update_configuration" "ScheduleWindows":
│ 149: occurrence = "-1"
│
╵
Is there an existing issue for this?
Community Note
Terraform Version
1.7.5
AzureRM Provider Version
3.95.0
Affected Resource(s)/Data Source(s)
azurerm_automation_software_update_configuration
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
According to https://registry.terraform.io/providers/hashicorp/azurerm/3.95.0/docs/resources/automation_software_update_configuration, the values for "occurrence" are expected to be 1-5 or -1. 1 meaning the first occurrence of the day and -1 meaning the last occurrence. When using occurrence = "-1" it is expected that the occurrence be set to "Last"
Actual Behaviour
Planning failed. Terraform encountered an error while generating this plan.
Error: expected schedule.0.monthly_occurrence.0.occurrence to be in the range (1 - 5), got -1
Steps to Reproduce
terraform plan
Important Factoids
No response
References
https://registry.terraform.io/providers/hashicorp/azurerm/3.95.0/docs/resources/automation_software_update_configuration