MyPureCloud/terraform-provider-genesyscloud

tf_export fails when selecting resource type genesyscloud_knowledge_knowledgebase

Closed this issue · 2 comments

Using Plugin v1.14.0 and running a tf_export using only the resource type of "genesyscloud_knowledge_knowledgebase" the terraform never completes. A manual cancel is required.

# genesyscloud_tf_export.init will be created
  + resource "genesyscloud_tf_export" "init" {
      + directory             = "./tmp_sa"
      + export_as_hcl         = false
      + id                    = (known after apply)
      + include_state_file    = true
      + log_permission_errors = false
      + resource_types        = [
          + "genesyscloud_knowledge_knowledgebase",
        ]
    }
genesyscloud_tf_export.init: Creating...
genesyscloud_tf_export.init: Still creating... [10s elapsed]
.....
genesyscloud_tf_export.init: Still creating... [8m20s elapsed]
Stopping operation...

Interrupt received.
Please wait for Terraform to exit or data loss may occur.
Gracefully shutting down...

When debug logs are checked the API call seems to be repeated constantly but never goes further. See attached sdk logs

When running tf_export excluding knowledge ( and SMS Addresses due to #490 ) it completes in 1 min 30 sec.

sdk_debug.log

Thanks
Gordon

Hi Gordon

Thanks for raising this issue.

It looks like the exporter for knowledgebases is filtering by "published": false, which is a mistake. Although I'm not sure why your export is getting stuck. If you don't mind, could you confirm that you have no problems running GET /api/v2/knowledge/knowledgebases against the same org that you are exporting (with published set to false)? This would just help me rule out other potential culprits.

Regards
Charlie

@gordon-walker Apologies, you can ignore the above request. I was able to recreate the behaviour locally.

We will take a look into the problem and get a fix out ASAP.

Thanks again
Charlie