Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  [BUG] Decimal question group weight causes issues for terraform

    Posted 07-30-2025 10:01

    Hi Genesys devs,

    My current use case is to replicate evaluation forms from our dev environment to our prod envrionment. In order to do this, I fetch evaluation forms in our dev environment using the Genesys API. I then construct terraform objects out of those forms and then apply this terraform to another environment. The team which designs the evaluation forms uses decimal group scaling factor so that some questions weigh almost no point but show up on the final evaluation report. Like this:

    The above usage of group scaling factor ends up in a weight of 0.1 for the question group. This is some example terraform which is generated by my code process:

    {
      "resource": {
        "genesyscloud_quality_forms_evaluation": {
          "evaluation_form_f5731a27-a0c8-4815-bb5e-605f1e31ca07": {
            "name": "Dummy form",
            "question_groups": [
              {
                "default_answers_to_highest": true,
                "default_answers_to_na": false,
                "manual_weight": false,
                "na_enabled": false,
                "name": "Dummy question group",
                "questions": [
                  {
                    "answer_options": [
                      {
                        "text": "Yes",
                        "value": 1
                      },
                      {
                        "text": "Maybe",
                        "value": 0
                      },
                      {
                        "text": "No",
                        "value": 0
                      }
                    ],
                    "comments_required": false,
                    "help_text": "",
                    "is_critical": false,
                    "is_kill": false,
                    "na_enabled": false,
                    "text": "When will you wear wigs?",
                    "visibility_condition": []
                  }
                ],
                "visibility_condition": [],
                "weight": 0.1
              }
            ]
          }
        }
      }
    }

    However, when doing a terraform apply it often fails with errors like this one for forms with question groups with decimal weights (ex: weight 0.1):

    So 0.1 becomes 0.10000000149011612 sometime during the apply it seems. 

    As you can see extra decimals are added to the weight and it seems to be causing an issue.

    All in all, the terraform is applied however the execution ends in an error which causes other problems in our process down the line.

    Thank you for looking into this issue!


    #Uncategorized

    ------------------------------
    William Valin
    ------------------------------


  • 2.  RE: [BUG] Decimal question group weight causes issues for terraform

    Posted 07-31-2025 09:57

    Adding #CXasCode tag



    ------------------------------
    --Jason
    ------------------------------