[Bug]: aws_chime_voice_connector
and related resources error and auto-taint after SDK upgrade
#34218
Labels
bug
Addresses a defect in current functionality.
prioritized
Part of the maintainer teams immediate focus. To be addressed within the current quarter.
regression
Pertains to a degraded workflow resulting from an upstream patch or internal enhancement.
service/chime
Issues and PRs that pertain to the chime service.
Milestone
Terraform Core Version
1.6.2
AWS Provider Version
5.22.0
Affected Resource(s)
aws_chime_voice_connector
aws_chime_voice_connector_termination
Expected Behavior
A configuration containing these resources should apply successfully in one pass of
terraform apply
Actual Behavior
The resources for Chime SDK Voice Connector service were updated on #33976 (from bug #33633), in v5.22.0 (though this was somehow excluded from the changelog for that release).
Following that release, running into what feels like some sort of race condition during resource creation (a
get
of some kind is failing while thecreate
is still happening), and manual workaround (see below) is required to get all resources deployed successfully.First attempt to deploy configuration:
Following this, we see the resource in state file, but missing expected attributes, and with a status of tainted.
Second attempt recreates the tainted resource, but still fails the same a second time:
Plan:
Apply:
After this apply, the replacement voice connector was created in AWS, as it was the first time, but again already tainted and missing attributes like the ARN in state. Additionally, the
terraform apply
run does not continue on to create the remaining resources.Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
terraform.tf
:main.tf
:Steps to Reproduce
How to recreate and workaround:
terraform apply
- errors during creation ofaws_chime_voice_connector.vc
resource, but actual voice connector is provisioned in AWS and is immediately tainted in stateterraform untaint aws_chime_voice_connector.vc
- successfulterraform apply -refresh-only
- pulls missing attributes into state (resource was created fine the first time, but provider errored before capturing entire state)terraform apply
- no change proposed foraws_chime_voice_connector.vc
, errors similarly during creation ofaws_chime_voice_connector_termination.vc_term
, which is immediately tainted in stateterraform untaint aws_chime_voice_connector_termination.vc_term
- successfulterraform apply -refresh-only
- pulls missing attributes ofaws_chime_voice_connector_termination.vc_term
into stateterraform apply
- no change proposed foraws_chime_voice_connector.vc
oraws_chime_voice_connector_termination.vc_term
, and provisionsaws_chime_voice_connector_termination_credentials.vc_term_creds
successfully on first try.Debug Output
No response
Panic Output
No response
Important Factoids
Running in Terraform Cloud. Did not experience this issue when running with
var.voice_connector_aws_region
set tous-east-1
, but did have the problem repeatedly, with samemain.tf
, ifvar.voice_connector_aws_region
set tous-west-2
for our secondary region.References
#33633 - Initial bug report that voice connector resources were using outdated Chime SDK APIs (related to aws/amazon-chime-sdk-js/issues/2697)
#33976 - PR to update Chime SDK resources to newer AWS SDK version
Would you like to implement a fix?
No
The text was updated successfully, but these errors were encountered: