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 report resources don't support import #157

Closed neatcoder closed 8 months ago

neatcoder commented 8 months ago

Describe the bug Xray report resources, namely, xray_vulnerabilities_report, xray_violations_report, xray_licenses_report, don't support import opposed to the documentation that claims otherwise.

Requirements for and issue

Planning failed. Terraform encountered an error while generating this plan.

│ Error: resource xray_vulnerabilities_report doesn't support import
│
│
Planning failed. Terraform encountered an error while generating this plan.

│ Error: resource xray_violations_report doesn't support import
│
│
Planning failed. Terraform encountered an error while generating this plan.

│ Error: resource xray_licenses_report doesn't support import
│
│

Jfrog artifactory version: 7.77.1 XRay version: 3.86.10 Terraform version: 1.5.5

Expected behavior Resources should support import.

alexhung commented 8 months ago

@neatcoder Thanks for the report. Looks like a bug from first glance. I'll add this to our plan to investigate.

alexhung commented 8 months ago

@neatcoder After familiarize myself with this part of the code (haven't touched it in many months), I understand that these report resources do not support import. So the documentations are incorrect and I'll be removing the "Import" section.

neatcoder commented 8 months ago

Any plans for extending the import support to these resources in future?

alexhung commented 8 months ago

@neatcoder Before we can add import support to the provider, the Xray API must support getting all the report generation detail. AFAIK, there's no plan from Xray team to add this support. You should contact your JFrog support team to make this feature request.