Genesys Cloud - Developer Community!

 View Only

Sign Up

Exporting the current state into HCL files generates HCL files with errors?

  • 1.  Exporting the current state into HCL files generates HCL files with errors?

    Posted 03-11-2026 07:39

    I am experimenting with "CX as Code", and as a first step I wanted to export the current state into HCL files.

    This runs through.

    But afterwards if I try to validate the generated HCL files by "terraform init && terraform validate", I get errors for the *generated* HCL files. One of these errors is for WFM business units:

     Error: Value for unconfigurable attribute
    │ 
    │   with genesyscloud_workforcemanagement_businessunits.BU1,
    │   on genesyscloud_workforcemanagement_businessunits.tf line 4, in resource "genesyscloud_workforcemanagement_businessunits" "BU1":
    │    4:     metadata {

    So basically the exporter generates HCL files which are not valid for import? Looks like a bug to me - and the "metadata" element is also present in the public API, last time I looked.

    What is going on here?

    Thanks in advance,

    Wolfgang Liebich


    #CXasCode

    ------------------------------
    Wolfgang Liebich
    ------------------------------