Skip to content

Conversation

@its2shar
Copy link
Member

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the library.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

Description

Add cross-channel behavior support to aws_connect_routing_profile resource and data source

Relations

Closes #35018

References

https://docs.aws.amazon.com/connect/latest/APIReference/API_CreateRoutingProfile.html
https://docs.aws.amazon.com/connect/latest/APIReference/API_UpdateRoutingProfileConcurrency.html

Output from Acceptance Testing

% make t K=connect T=TestAccConnect_serial/RoutingProfile/crossChannelBehavior
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 r/aws_connect_routing_profile 🌿...
TF_ACC=1 go1.24.8 test ./internal/service/connect/... -v -count 1 -parallel 20 -run='TestAccConnect_serial/RoutingProfile/crossChannelBehavior'  -timeout 360m -vet=off
2025/10/21 19:08:59 Creating Terraform AWS Provider (SDKv2-style)...
2025/10/21 19:08:59 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccConnect_serial
=== PAUSE TestAccConnect_serial
=== CONT  TestAccConnect_serial
=== RUN   TestAccConnect_serial/RoutingProfile
=== RUN   TestAccConnect_serial/RoutingProfile/crossChannelBehavior
--- PASS: TestAccConnect_serial (186.41s)
    --- PASS: TestAccConnect_serial/RoutingProfile (186.41s)
        --- PASS: TestAccConnect_serial/RoutingProfile/crossChannelBehavior (186.41s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/connect    191.755s

@its2shar its2shar requested a review from a team as a code owner October 21, 2025 13:49
@github-actions
Copy link
Contributor

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/connect Issues and PRs that pertain to the connect service. size/L Managed by automation to categorize the size of a PR. labels Oct 21, 2025
"behaviour": {
Type: schema.TypeString,
Optional: true,
Default: string(awstypes.BehaviorTypeRouteAnyChannel),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than set a provider-side default, we can set this as optional and computed and inherit the AWS default as a read-only value.

https://hashicorp.github.io/terraform-provider-aws/data-handling-and-conversion/#default-values

Required: true,
ValidateFunc: validation.IntBetween(1, 10),
},
"behaviour": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To match the AWS API, this should be a list nested block (MaxItems: 1) with a single string attribute inside.

  cross_channel_behavior {
    behavior_type = ""
  }

Type: schema.TypeInt,
Computed: true,
},
"behaviour": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above - the shape of this attribute should match the AWS API.

@@ -0,0 +1,3 @@
```release-note:enhancement
resource/aws_connect_routing_profile: Add behaviour support to media_concurrencies block
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New argument additions typically use the following pattern:

Suggested change
resource/aws_connect_routing_profile: Add behaviour support to media_concurrencies block
resource/aws_connect_routing_profile: Add `media_concurrencies.cross_channel_behavior` argument

Also, there should be a corresponding changelog entry for the data source.

default_outbound_queue_id = aws_connect_queue.default_outbound_queue.queue_id
description = "Test cross-channel behavior - %[2]s"
%[3]s
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Embedding variable blocks of HCL like this can make the configuration difficult to reason about when debugging. Although more text is required, explicitly writing out the media_concurrencies blocks in separate config helpers makes the comparison between steps easier to understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Introduces or discusses updates to documentation. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/connect Issues and PRs that pertain to the connect service. size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement]: Add support for concurrency cross channel behaviour to aws_connect_routing_profile

2 participants