TF Plan fails with an error Operation failed: failed generating plan JSON

We use skillgroups and queues are configured with skillgroups assigned.

Our skillgroups have thousands of agents and when i update a queues with new skillgroups assigned the terraform plan takes long time and eventually fails with the following error:

Operation failed: failed generating plan JSON: failed running command (exit -1)

The reason of this error is because terraform prints all new agents that will be added to the queues. So if i update 100 queues by adding a skillgroup that has 1000 agents, the terraform plan prints 1000 agents for each 100 queues.
Note we don't manage user's via terraform, we just use skillgroups with skill expression and assign them to queues.
Is there a way to avoid such issue?

1 Like

Hi Ihor,

How long was the plan running for? Could you run it again with the TF_LOG=DEBUG and the TF_LOG_PATH="<>" environment variables set and send the logs to George? Can you also give George (or Premkumar ) an example of the terraform changes you are trying to make in your TF file.

Also what version of the terraform CLI and provider are you using?

We can take a look from there.

Thanks,
John Carnell
Director, Developer Engagement

Hi Ihor,

Also one other question. If I understand your post you are using a resource_genesyscloud_skillgroups to create a queue based on a set of rules. Then that skill group is assigned to the queue.

So you are not doing direct agent assignments to the queue but rather assigning users via a skill group.

Thanks,
John

Hey @John_Carnell - to give more context, our GHE PR's trigger a plan only run for every commit, we don't know the specifics behind it as we don't own that infra, but we're assuming these are triggered via API and not via CLI.

When the plan fails due to what appears is the plan checking the remote (e.g. queue members), it's not allowing us to proceed with merging our PR due to said plan failure.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.