You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.
Terraform Version
1.10.2
AzureRM Provider Version
4.14.0
Affected Resource(s)/Data Source(s)
azurerm_logic_app_trigger_recurrence
Terraform Configuration Files
locals {
xxx_logic_app=jsondecode(file("${path.module}/xxx_logic_app.json"))
}
resource"azurerm_logic_app_trigger_recurrence""xxx_triggers_recurrence" {
for_each={ fort,vinlocal.xxx_logic_app.definition.triggers:t=>vifv.type=="Recurrence" }
name=each.keylogic_app_id=azurerm_logic_app_workflow.xxx.idfrequency=each.value.recurrence.frequencyinterval=each.value.recurrence.intervalstart_time=each.value.recurrence.startTimetime_zone=each.value.recurrence.timeZone# schedule {# days_of_month = each.value.recurrence.schedule.MonthDays # Need to be supported# }
}
Debug Output/Panic Output
None captured
Expected Behaviour
When an existing reccurrence trigger is imported that is set up with monthDays then the resource should show changes to the schedule. eg with this trigger imported
So if we assume we are changing the monthdays to [1, 10, 20]
# azurerm_logic_app_trigger_recurrence.clearvue_triggers_recurrence["Recurrence"] will be updated in-place
~ resource "azurerm_logic_app_trigger_recurrence" "xxx_triggers_recurrence" {
id = "/subscriptions/xxxx/resourceGroups/xxxx/providers/Microsoft.Logic/workflows/xxxx/triggers/Recurrence"
name = "Recurrence"
# (5 unchanged attributes hidden)
- schedule {
- no_of_days = [ -1 ] -> [ 1, 10, 20 ]
- }
}
Actual Behaviour
When an existing reccurrence trigger is imported that is set up with monthDays then the resource does not show changes to the schedule - other than it will remove the schedule entirely. eg with this trigger imported
I started to use this function because I was seeing drift with the custom function, but I have looked again at this. My json code is copied out of the console (sent from a third party) where it includes an element "evaluatedRecurrence". The Rest API does not return this so there is not a lot that Terraform could do to prevent the drift. However, if I take this out of the JSON myself then the drift issue is resolved.
resource "azurerm_logic_app_trigger_custom" "xxx_triggers" {
# The rest API does not return the evaluatedReccurrence so this will cause drift. Remove it.
for_each = { for t,v in local.xxx_logic_app.definition.triggers : t => {for vk,vv in v : vk => vv if vk != "evaluatedRecurrence"} }
name = each.key
logic_app_id = azurerm_logic_app_workflow.xxxx.id
body = jsonencode(each.value)
}
Given this I will be using the custom trigger resource going forward. It's easier in my use case.
Is there an existing issue for this?
Community Note
Terraform Version
1.10.2
AzureRM Provider Version
4.14.0
Affected Resource(s)/Data Source(s)
azurerm_logic_app_trigger_recurrence
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
When an existing reccurrence trigger is imported that is set up with monthDays then the resource should show changes to the schedule. eg with this trigger imported
So if we assume we are changing the monthdays to [1, 10, 20]
Actual Behaviour
When an existing reccurrence trigger is imported that is set up with monthDays then the resource does not show changes to the schedule - other than it will remove the schedule entirely. eg with this trigger imported
After applying the schedule is removed from the logic app.
Steps to Reproduce
No response
Important Factoids
No response
References
MicrosoftDocs/azure-docs#26707 shows that setting the monthDays to -1 is the last day of the month.
The text was updated successfully, but these errors were encountered: