Aws_connect_queue issue?

Not sure if anyone else is experiencing issues with the AWS provider on this.

Not comfortable posting on Github as issue since I can’t provide all the logs due to policy.

I wasn’t able to create the Connect queues using TF either so I created a couple using console. But when creating “aws_connect_routing_profile”, which uses the “queue_id” of the already created connect_queue, it still complains. So I’m not sure if all resources related to aws_connect_queue are broken? or am I just crazy.

Terraform: 1.6.2
AWS Provider: 5.22.0

To Reproduce:

creating aws_connect_routing_profile using block such as this

resource “aws_connect_routing_profile” “route_to_en” {
instance_id = aws_connect_instance.this_instance.arn
name = “en_it_route”
default_outbound_queue_id = “84663480-8bd5-40b6-9b9d-fc3b3e8ce1ce”
description = “route to the EN queue”

media_concurrencies {
    channel     = "VOICE"
    concurrency = 1
}
# EN queue has higher priority
queue_configs {
    channel  = "VOICE"
    delay    = 2
    priority = 1
    queue_id = "84663480-8bd5-40b6-9b9d-fc3b3e8ce1ce"
}
queue_configs {
    channel  = "VOICE"
    delay    = 2
    priority = 2
    queue_id = "ee6c3119-c496-4a5f-9cb5-b9d637c0ec44"
}

}

The 2 queue_ids: “8466xxxx” and “ee6cxxxx” were created from console.
and verified from cli using command such as

aws connect list-queues --instance-id 3a68xxxxxxxxxxxxxxxd9 --profile xxxxx

The error I’m getting:
Error: getting Connect Queue (arn:aws:connect:ca-central-1:acct_number_here:instance/3aconnect_instance_id_here9:7fe81a91-c844-478f-9cbd-58ab88c6be5c): InvalidParameterException: Invalid parameter: arn

it looks like it should be maybe “/queue/” as part of ARN instead of “:” before the queue ID.

thanks for your time

I have the same issue. Just trying to set up some queues to test a Lambda function with, and getting the same error. Here’s my test TF file:

# This terraform file creates many queues in Connect

provider "aws" {
  region = "eu-west-2"
}

data "aws_connect_instance" "connect_instance" {
  instance_alias = "myinstancealias"
}

data "aws_connect_hours_of_operation" "hours_of_operation" {
  instance_id = data.aws_connect_instance.connect_instance.id
  name        = "Basic Hours"
}

data "aws_connect_contact_flow" "default_outbound" {
  instance_id = data.aws_connect_instance.connect_instance.id
  name       = "Default outbound"
}

variable queue_count {
    default = 1
}

resource "aws_connect_phone_number" "number" {
  target_arn = data.aws_connect_instance.connect_instance.arn
  country_code = "GB"
  type = "DID"
}

resource "random_pet" "queue" {
  count = var.queue_count
  prefix = "queue"
}

resource "aws_connect_queue" "queue" {
  count       = var.queue_count
  name        = random_pet.queue[count.index].id
  description = "Queue for ${random_pet.queue[count.index].id}"
  instance_id = data.aws_connect_instance.connect_instance.id
  hours_of_operation_id = data.aws_connect_hours_of_operation.hours_of_operation.id
  outbound_caller_config {
    outbound_caller_id_name   = "Test Queue ${random_pet.queue[count.index].id}"
    outbound_caller_id_number_id = aws_connect_phone_number.number.id
    outbound_flow_id = data.aws_connect_contact_flow.default_outbound.id
  }
}

I had some typos. I did some cleanup of the created resources, wiped the state file, and then this snippet worked:

resource "aws_connect_queue" "queue" {
  count       = var.queue_count
  name        = random_pet.queue[count.index].id
  description = "Queue for ${random_pet.queue[count.index].id}"
  instance_id = data.aws_connect_instance.connect_instance.id
  hours_of_operation_id = data.aws_connect_hours_of_operation.hours_of_operation.hours_of_operation_id
  outbound_caller_config {
    outbound_caller_id_name   = "Test Queue ${random_pet.queue[count.index].id}"
    outbound_caller_id_number_id = aws_connect_phone_number.number.id
    outbound_flow_id = data.aws_connect_contact_flow.default_outbound.contact_flow_id
  }
}

ok, will try it. thanks for sharing.

i didn’t have outbound_caller_config and I didn’t wipe the state.

i’m dumb, “outbound_caller_config” is apparently required that I missed.