-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
td/aws_connect - associate disassociate type sets #26151
Conversation
c03449b
to
d702356
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hey @GlennChia , can this be merged already ? |
Hi @dttung2905, PR is ready on my end. I'm a community contributor as well so I don't have merge permissions. I believe the team has a prioritization guide for PRs here: https://hashicorp.github.io/terraform-provider-aws/prioritization/. |
We can only remove attributes as part of a major release. |
associate new elements and disassoicate only those removed
disassociate updated elements and assoicate only those updated
d702356
to
bacdf7d
Compare
Thanks @ewbankkit, attributes have been listed as deprecated with changelog introduced. For documentation, since this attribute was never written in the website documentation before this PR, should it be introduced with the deprecation notice? Thanks! Reference: terraform-provider-aws/website/docs/r/connect_routing_profile.html.markdown Lines 66 to 79 in 5acce42
Reference: terraform-provider-aws/website/docs/r/connect_queue.html.markdown Lines 93 to 100 in 5acce42
|
I'm also getting errors when the tests are run (these are related to this PR):
Upon further investigation, I found that it had to do with the
On a fresh Connect instance, I ran the
Proposed fix: change default of terraform-provider-aws/internal/service/connect/instance.go Lines 91 to 95 in 5acce42
|
@GlennChia I think the problem with Connect Instance attributes is that they are only getting set on Create if the value is terraform-provider-aws/internal/service/connect/instance.go Lines 149 to 161 in 33151ab
I am testing with always sending the value, ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
% make testacc TESTARGS='-run=TestAccConnect_serial/RoutingProfile' PKG=connect
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/connect/... -v -count 1 -parallel 20 -run=TestAccConnect_serial/RoutingProfile -timeout 180m
=== RUN TestAccConnect_serial
=== PAUSE TestAccConnect_serial
=== CONT TestAccConnect_serial
=== RUN TestAccConnect_serial/RoutingProfile
=== RUN TestAccConnect_serial/RoutingProfile/concurrency
=== RUN TestAccConnect_serial/RoutingProfile/defaultOutboundQueue
=== RUN TestAccConnect_serial/RoutingProfile/queues
=== RUN TestAccConnect_serial/RoutingProfile/dataSource_id
=== RUN TestAccConnect_serial/RoutingProfile/dataSource_name
=== RUN TestAccConnect_serial/RoutingProfile/basic
=== RUN TestAccConnect_serial/RoutingProfile/disappears
routing_profile_test.go:77: Routing Profiles do not support deletion today
=== RUN TestAccConnect_serial/RoutingProfile/tags
--- PASS: TestAccConnect_serial (1310.81s)
--- PASS: TestAccConnect_serial/RoutingProfile (1310.81s)
--- PASS: TestAccConnect_serial/RoutingProfile/concurrency (139.62s)
--- PASS: TestAccConnect_serial/RoutingProfile/defaultOutboundQueue (117.00s)
--- PASS: TestAccConnect_serial/RoutingProfile/queues (219.99s)
--- PASS: TestAccConnect_serial/RoutingProfile/dataSource_id (190.94s)
--- PASS: TestAccConnect_serial/RoutingProfile/dataSource_name (190.85s)
--- PASS: TestAccConnect_serial/RoutingProfile/basic (218.37s)
--- SKIP: TestAccConnect_serial/RoutingProfile/disappears (0.00s)
--- PASS: TestAccConnect_serial/RoutingProfile/tags (234.04s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/connect 1319.749s
% make testacc TESTARGS='-run=TestAccConnect_serial/Queue' PKG=connect
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/connect/... -v -count 1 -parallel 20 -run=TestAccConnect_serial/Queue -timeout 180m
=== RUN TestAccConnect_serial
=== PAUSE TestAccConnect_serial
=== CONT TestAccConnect_serial
=== RUN TestAccConnect_serial/Queue
=== RUN TestAccConnect_serial/Queue/disappears
queue_test.go:74: Queues do not support deletion today
=== RUN TestAccConnect_serial/Queue/hoursOfOperationId
=== RUN TestAccConnect_serial/Queue/maxContacts
queue_test.go:174: A bug in the service API has been reported
=== RUN TestAccConnect_serial/Queue/outboundCallerConfig
=== RUN TestAccConnect_serial/Queue/status
=== RUN TestAccConnect_serial/Queue/basic
=== RUN TestAccConnect_serial/Queue/tags
=== RUN TestAccConnect_serial/Queue/quickConnectIds
=== RUN TestAccConnect_serial/Queue/dataSource_id
=== RUN TestAccConnect_serial/Queue/dataSource_name
--- PASS: TestAccConnect_serial (940.35s)
--- PASS: TestAccConnect_serial/Queue (940.35s)
--- SKIP: TestAccConnect_serial/Queue/disappears (0.00s)
--- PASS: TestAccConnect_serial/Queue/hoursOfOperationId (147.12s)
--- SKIP: TestAccConnect_serial/Queue/maxContacts (0.00s)
--- PASS: TestAccConnect_serial/Queue/outboundCallerConfig (112.10s)
--- PASS: TestAccConnect_serial/Queue/status (118.21s)
--- PASS: TestAccConnect_serial/Queue/basic (108.01s)
--- PASS: TestAccConnect_serial/Queue/tags (120.82s)
--- PASS: TestAccConnect_serial/Queue/quickConnectIds (148.38s)
--- PASS: TestAccConnect_serial/Queue/dataSource_id (88.72s)
--- PASS: TestAccConnect_serial/Queue/dataSource_name (96.99s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/connect 951.070s
% make testacc TESTARGS='-run=TestAccConnect_serial/^Instance$$' PKG=connect
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/connect/... -v -count 1 -parallel 20 -run=TestAccConnect_serial/^Instance$ -timeout 180m
=== RUN TestAccConnect_serial
=== PAUSE TestAccConnect_serial
=== CONT TestAccConnect_serial
=== RUN TestAccConnect_serial/Instance
=== RUN TestAccConnect_serial/Instance/dataSource_basic
=== RUN TestAccConnect_serial/Instance/basic
=== RUN TestAccConnect_serial/Instance/directory
=== RUN TestAccConnect_serial/Instance/saml
--- PASS: TestAccConnect_serial (1015.19s)
--- PASS: TestAccConnect_serial/Instance (1015.18s)
--- PASS: TestAccConnect_serial/Instance/dataSource_basic (120.84s)
--- PASS: TestAccConnect_serial/Instance/basic (97.86s)
--- PASS: TestAccConnect_serial/Instance/directory (660.04s)
--- PASS: TestAccConnect_serial/Instance/saml (136.45s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/connect 1020.538s
…ust if they're 'true'.
@GlennChia Thanks for the contribution 🎉 👏. |
This functionality has been released in v4.59.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Relates #21023
Relates #21021
Instead of disassociating all the currently associated elements and re-associating them, we get the diffs instead and do individual associations and disassociations only for those diffs (additions or subtractions)
Output from acceptance testing: