jfrog / terraform-provider-artifactory

Terraform provider to manage JFrog Artifactory
https://jfrog.com/artifactory
Apache License 2.0
275 stars 105 forks source link

Request to add support for repo_type in resources while creating a watch #56

Closed jkumar19 closed 3 years ago

jkumar19 commented 3 years ago

Describe the bug Recently this jfrog/artifactory provider added support to create XRay policies and watches which is a nice feature and many of us were waiting for this capability to be added in this provider.

I just started exploring policy and watch creation using terraform but what I notice is specifically for the watches that we can't add a remote repository in resources section. By default it treat the repository as local. I think it make sense if we can add one more attribute repo_type something like this:

resource "artifactory_xray_watch" "xray_watch" {
    name = "watch1"
    active = true

    resources {
       type = "repository"
       name = "abc-local"
       repo_type = "local"    ---- this is default value
    }

   resources {
       type = "repository"
       name = "abc-remote"
       repo_type = "remote"
  }
  ....
  ....
}

Requirements for and issue

Expected behavior As stated above I think we should have a parameter to segregate local and remote artifactory repositories.

Additional context Add any other context about the problem here.

jkumar19 commented 3 years ago

@chb0github - Christian any support on this is highly appreciated.

chb0github commented 3 years ago

If you're a paying customer I would suggest submitting a ticket - that normally seems to light a fire

markgalpin commented 3 years ago

We have reviewed this internally and we expect we can address this issue on the JFrog side by the end of Q2 -- we have a few unrelated work items in the queue that have to be addressed first. Our preferred solution will be to migrate off the xero-oss client to jfrog-client-go as the client library. If someone wants to help accelerate this transition we always welcome the help!

chb0github commented 3 years ago

So, you've already forked the repo - how about you keep your change and merge it into the master branch of your fork.

Then, you update the go.mod in the provider to simply use your repo. Dead simple! I mean, from our perspective, it really doesn't matter what OSS repo we depend on.