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_license_policy stuck #262

Open Osazz opened 3 hours ago

Osazz commented 3 hours ago

Describe the bug xray_license_policy resource is getting stuck infinitely when trying to import or plan a resource with plenty allowed_licenses . Currently have 2000+ allowed_licenses.

Requirements for and issue

resource "xray_license_policy" "allowed_licenses" {
  name        = "test-license-policy"
  description = "License policy, allow certain licenses"
  type        = "license"

  rule {
    name     = "License_rule"
    priority = 1

    criteria {
      allowed_licenses         = [<LONG LIST OF license currentlly have 2000+> ]
      allow_unknown            = false
      multi_license_permissive = true
    }

    actions {
      block_release_bundle_distribution = false,
      create_ticket_enabled             = false,
      custom_severity                   = "Low",
      fail_build                        = false,
      mails                             = null,
      notify_deployer                   = false,
      notify_watch_recipients           = true,
      webhooks                          = null,
      block_download {
        unscanned = true
        active    = true
      }

    }
  }
}

DEBUG LOG

2024-10-31T13:07:48.033-0300 [WARN]  unexpected data: registry.terraform.io/jfrog/xray:
[DEBUG] provider.terraform-provider-xray_v2.13.0: Value switched to prior value due to semantic equality logic: @module=sdk.framework tf_req_id=7f342b2c-749d-f42e-8f5a-7710cd2d923c tf_resource_type=xray_license_policy @caller=github.com/hashicorp/terraform-plugin-framework@v1.12.0/internal/fwschemadata/value_semantic_equality.go:91 tf_attribute_path=name tf_provider_addr=registry.terraform.io/jfrog/xray tf_rpc=ReadResource timestamp=2024-10-31T13:07:48.226-0300

Expected behavior

Additional context When I have few allowed license in the list (tested 15), it work as expected. was able to import and run plan

alexhung commented 3 hours ago

@Osazz Thanks for the report. May I ask you to share more of your debug log with me? You can email me at alexh at jfrog.com.