jfrog / terraform-provider-xray

Terraform provider to manage JFrog Xray
https://jfrog.com/xray/
Apache License 2.0
149 stars 12 forks source link

xray_ignore_rule error out when build and component is specifiy #146

Closed Osazz closed 10 months ago

Osazz commented 10 months ago

Describe the bug TF resource xray_ignore_rule fails on plam

Requirements for and issue

Terraform Code

resource "xray_ignore_rule" "ignore_rule" {
  notes           = "delete me now test ignore rule iac"
  vulnerabilities = ["XRAY-170461"]

  component {
    name    = "<some-component"
    version = "<some-veriosn>"
  }

  build {
    name = "<some-build>"
  }

**Additional context**

- In Artifactory UI

When ignore-rule is been created from the UI, I can select both component and build and no error or problem

<img width="812" alt="Screenshot 2023-11-10 at 1 07 48 PM" src="https://github.com/jfrog/terraform-provider-xray/assets/19154439/89269fb0-e622-4e6e-a833-be3ce81c0fe2">

- Importing existing rule 

"instances": [ { "schema_version": 0, "attributes": { "artifact": [], "author": "", "build": [ { "name": "", "version": "" } ], "component": [ { "name": "", "version": "" } ], "created": "2023-10-24T16:05:57Z", "cves": null, "docker_layers": null, "expiration_date": "2023-11-10", "id": "", "is_expired": false, "licenses": null, "notes": "delete me for now", "operational_risk": null, "policies": null, "project_key": null, "release_bundle": [], "vulnerabilities": [ "XRAY-170461" ], "watches": [ "Watch" ] } } ]