Closed
Description
When you try to modify the cron trigger from terraform, it creates a new trigger with the new settings but doesn't delete the old one.
Details:
Add a cron trigger and try to update it:
Terraform will perform the following actions:
# codefresh_pipeline_cron_trigger.test will be updated in-place
~ resource "codefresh_pipeline_cron_trigger" "test" {
~ expression = "*/1 * * * 1" -> "*/1 * * * 2"
id = "cron:codefresh:*/1 * * * 1:Example Cron Trigger:53be2183993e"
# (2 unchanged attributes hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
Apply:
Plan: 0 to add, 1 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
codefresh_pipeline_cron_trigger.test: Modifying... [id=cron:codefresh:*/1 * * * 1:Example Cron Trigger:53be2183993e]
codefresh_pipeline_cron_trigger.test: Modifications complete after 1s [id=cron:codefresh:*/1 * * * 2:Example Cron Trigger:53be2183993e]
Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
Two cron triggers now exist in the pipeline:
Expected Behavior:
Cron trigger object modified
Current behavior:
A new cron trigger is created, but the old one isn’t deleted.