taiidani / terraform-provider-jenkins

Jenkins Terraform Provider
https://registry.terraform.io/providers/taiidani/jenkins/latest
Apache License 2.0
76 stars 42 forks source link

Ignore Plugin Version when calculating diff #182

Open samgurtman opened 7 months ago

samgurtman commented 7 months ago

Hey there, love the plugin. It's super useful for us.

I have an issue where I need to put ignore_changes on all our templates, because the plugin thinks there's an update required even if the template has not changed.

This appears to be because the XML it receives from Jenkins has plugin version automatically added whereas the XML template we submit does not. Theoretically we could hardcode the plugin versions in our template but that will cause issues when we update the plugins on the server.

Ideally, we could have an option to ignore the plugin versions when calculating the diff.

Is this possible?

Example of diff found:

<?xml version='1.1' encoding='UTF-8'?>
          - <org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject plugin="workflow-multibranch@756.v891d88f2cd46">
          + <org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject plugin="workflow-multibranch">
              <actions/>
              <description>Jenkinsfile builder for Gitlab Project olympus/test-terraform-project</description>