Hi: I am creating a terraform script to create AWS connect instance, with these resources aws_connect_instance, aws_connect_phone_number, aws_connect_hours_of_operation, aws_connect_queu. the resources got created properly but Terraform can’t destroy the infrastructure due to the fact that an “aws_connect_queue” depends on " aws_connect_hours_of_operation". I also have added the depends_on tag to the “aws_connect_queue” but still having the same issue. Can some one please let me know what is the proper way of destroying and am I missing anything. See the example below
resource “aws_connect_hours_of_operation” “main_contact_center” {
instance_id = aws_connect_instance.main_contact_center.id
name = “Main Office Hours”
description = “Monday office hours”
time_zone = “US/Central”
…
}
resource “aws_connect_queue” “main_contact_center” {
instance_id = aws_connect_instance.main_contact_center.id
name = “Sales Queue”
description = “This is a Sales Queue”
hours_of_operation_id = aws_connect_hours_of_operation.main_contact_center.hours_of_operation_id
depends_on = [
aws_connect_hours_of_operation.main_contact_center
]
…
}