Terraform - Error creating queues with bullseye_rings

Hello colleagues,

I'm here again, needing help with Terraform!
I am creating several queues with bullseye_rings. For this I am relying on a csv file.
Within the bullseye_rings, each queue has a different amount of member groups.
In the csv file, I have to take into consideration as many member groups as possible.
When a queue does not have the maximum possible member groups, I leave that value blank, but the system returns an error.

A quick solution I have found is, to repeat the member groups, until the maximum number is reached.
This really works for me, but I wonder if there is another solution.

Do you understand me?

Thanks in advance.

Hi Javier

Could you please clarify which value you are leaving blank in the queues resource, and what error you are getting back?

Hello Charlie,

for example, I am creating two queues, one with two rings, and one with three.
In my csv file, I have to contemplate the maximum number of possibilities, that is, three.

Do you understand?

Thanks in advance.

and a related question...

how can I create a member groups of type skillgroup, without having to create a bullseye_rings ?

Thanks in advance.

Hi Javier

I still don't understand at the moment. You're reading csv data into terraform variables? The indexing of a data source does not seem like valid terraform code to me.

If you're saving all the skill names in bull_skills_to_remove, I suggest creating separate data sources for each of them and referencing them individually in the skills_to_remove array.

To answer your other question, we have another resource called genesyscloud_routing_skill_group. You can create skill groups separately with this.

Hi Charlie,

Regarding the first point, I am investigating a possible solution.

I am going to create two queues. Queue A has two bullseye_rings. Queue B has one bullseye_rings.
The data about the queues I have in a .csv, but I think this is not relevant.

I attach a screenshot of the .tf in case it helps to understand.

The only solution is to have a .tf for case A, and another .tf for case b?

On the second point.
How can I assign a skillgroup to a queue, which has no bullyese rings?

Thanks for your patience!

I'm not aware of any way to recursively generate the bullseye_rings sets as they are nested within the resource. I would recommend checking out some hashicorp forums to discover if it has been/can be done. Generally, we use this forum to provide help regarding our own API and tools.

However, if you're only creating two queues, and they do differ in some way, I would recommend coding them manually as separate resources. It means more lines of code, but in the end you will have control over both of them, and will be able to easily edit/destroy them as you please.

To answer your second question; the skill_groups array allows you to do this. Example:

resource "genesyscloud_routing_queue" "queue" {
    skill_groups = [data.genesyscloud_routing_skill_group.skillgroup.id]
    // and for regular groups
    groups       = [data.genesyscloud_group.group.id]
}

Regards
Charlie

Hi Charlie,

about the first case, ok, I'll look into Hashi's documentation.

About the second case. I can't assign a created skillgroup to a queue.
Could you launch the resource, and confirm me, if you get it?

Thanks in advance.

This small example worked fine for me using v1.13.0

resource "genesyscloud_routing_queue" "queue" {
    name         = "a test tf queue 2803"
    skill_groups = [genesyscloud_routing_skill_group.skillgroup.id]
}

resource "genesyscloud_routing_skill_group" "skillgroup" {
    name = "a test tf skill group 2803"
}

But in that case, are you adding a skillgroup to a queue?

Yes, I'm creating the skill group first and then adding it to the queue. It is equivalent to going Members -> Groups -> Add Group... in the Admin UI.

Hi Charlie,

if you tell me that with the .tf contained in that screenshot, you are assigning a skillgroup to a queue. But to which queue?.

Are you putting two resources in the same .tf?


resource "genesyscloud_routing_queue" "queue" {
name = "a test tf queue 2803"
skill_groups = [genesyscloud_routing_skill_group.skillgroup.id]
}

resource "genesyscloud_routing_skill_group" "skillgroup" {
name = "a test tf skill group 2803"
}


Thanks in advance.

Yes, exactly. I'm creating both resources in the same tf file. First the skill group, which is assigned to the queue named "a test tf queue 2803"