Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xray_ignore_rule error out when build and component is specifiy #146

Closed
Osazz opened this issue Nov 10, 2023 · 0 comments · Fixed by #147
Closed

xray_ignore_rule error out when build and component is specifiy #146

Osazz opened this issue Nov 10, 2023 · 0 comments · Fixed by #147
Assignees
Labels
bug Something isn't working

Comments

@Osazz
Copy link

Osazz commented Nov 10, 2023

Describe the bug
TF resource xray_ignore_rule fails on plam

Requirements for and issue

  • Xray Provider version
jfrog/xray v2.0.2
  • Terraform Version
Terraform v1.5.2

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>"
  }
  • Terraform Plan Output + Error
╷
│ Error: Conflicting configuration arguments
│
│   with xray_ignore_rule.ignore_rule,
│   on main.tf line 22, in resource "xray_ignore_rule" "ignore_rule":
│   22: resource "xray_ignore_rule" "ignore_rule" {
│
│ "component": conflicts with build
╵
  • Expected Behaviour
Plan should be successful

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

Screenshot 2023-11-10 at 1 07 48 PM
  • Importing existing rule
"instances": [
        {
          "schema_version": 0,
          "attributes": {
            "artifact": [],
            "author": "<some-author>",
            "build": [
              {
                "name": "<some-build-name>",
                "version": ""
              }
            ],
            "component": [
              {
                "name": "<some-component>",
                "version": "<some_verion>"
              }
            ],
            "created": "2023-10-24T16:05:57Z",
            "cves": null,
            "docker_layers": null,
            "expiration_date": "2023-11-10",
            "id": "<some-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"
            ]
          }
        }
      ]
@Osazz Osazz added the bug Something isn't working label Nov 10, 2023
@alexhung alexhung assigned alexhung and unassigned danielmkn Nov 10, 2023
alexhung added a commit that referenced this issue Nov 16, 2023
…onflict

Remove 'component' conflict validations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants