Skip to content

Cron Trigger Duplicated When You Try to Modify it #99

Closed
@korenyoni

Description

@korenyoni

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:

image
image
image

Expected Behavior:

Cron trigger object modified

Current behavior:

A new cron trigger is created, but the old one isn’t deleted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions