Skip to content

Add possibility to archive pipelines instead of destroying them #60

@nemoinho

Description

@nemoinho

Hello!

I was wondering if the pipelines could be archived, instead of being destroyed, when the resource is removed from the configuration. At least for me that would be a great option, because then I'm able to view old builds in my organisation, after I've removed them from my configuration. (E.g. for Post mortem scenarios)

Another benefit for me would be that the penalty for accidentally removing a resource wouldn't be as high. In that case, I could just revert the change and restore the build history thereby.

Since this idea is a rather incisive change I would suggest a opt-in configuration.

My preferred way to configure this would be a flag on the provider itself, say archive_instead_of_delete. Another possibility would be another flag in the pipeline-resource, say is_archived. However I don't like the idea of another flag because it may make most other settings obsolete in the case of an archived pipeline. It furthermore has a huge potential for conflicts, therefore I would prefer a flag on the provider.

A possible provider configuration may look like this then:

provider "concourse" {
  url    = "https://example.com"
  target = "base"

  # This defaults to false
  archive_instead_of_delete = true
}

I could contribute a PR for this as well and like to know if this is desired.

What do you think about this, do you have any experience in this topic, any concerns or another suggestion?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions