-
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
Terraform AWS Provider Version 2.45.0: Missing Error Messages and Not Retrying #11682
Comments
Created upstream AWS Go SDK issue: aws/aws-sdk-go#3088 |
Upstream fix aws/aws-sdk-go#3089 appears to resolve this issue -- we'll get this dependency update merged as soon as its available upstream. |
The upstream fix for this has been merged and should go out with today's AWS Go SDK release. |
Reference: #11682 Reference: aws/aws-sdk-go#3089 The fix for widespread error handling regression was merged upstream into the AWS Go SDK, however there was not a release today on the normal daily release cadence. This pulls in the commit after AWS Go SDK v1.28.7 containing the fix for the missing error messages that was merged yesterday so we can allow the full acceptance test suite to run overnight. Updated via: ``` go get github.com/aws/aws-sdk-go@6ca8a5496cb4723ad4ef1e6709ed593ea81ce000 go mod tidy go mod vendor ``` Output from acceptance testing (as a smoke test of the fixed behavior): ``` --- PASS: TestAccAWSCodeBuildProject_basic (37.35s) ```
Reference: #11682 Reference: aws/aws-sdk-go#3089 The fix for widespread error handling regression was merged upstream into the AWS Go SDK, however there was not a release today on the normal daily release cadence. This pulls in the commit after AWS Go SDK v1.28.7 containing the fix for the missing error messages that was merged yesterday so we can allow the full acceptance test suite to run overnight. Updated via: ``` go get github.com/aws/aws-sdk-go@6ca8a5496cb4723ad4ef1e6709ed593ea81ce000 go mod tidy go mod vendor ``` Output from acceptance testing (as a smoke test of the fixed behavior): ``` --- PASS: TestAccAWSCodeBuildProject_basic (37.35s) ```
Oddly enough, there was not an AWS Go SDK release on its normal daily release cadence today. To ensure we have fully run the provider test suite (occurs nightly), we have merged in the expected fix directly. If there are no additional regressions, this fix will release tomorrow with version 2.46.0 of the Terraform AWS Provider. |
This has been released in version 2.46.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 for triage. Thanks! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Terraform Version
Terraform AWS Provider version 2.45.0
Affected Resource(s)
aws_cloud9_environment_ec2
aws_cloudtrail
aws_cloudwatch_log_destination
aws_cloudwatch_log_subscription
aws_codebuild_project
aws_codedeploy_deployment_group
aws_config_delivery_channel
aws_ecs_service
aws_elasticsearch_domain
Additional resources and errors may be missing error messaging as well, however these are directly affected by resource logic attempting to retry on error messages that are no longer present in the AWS Go SDK as of version 1.28.0.
Terraform Configuration Files
# Resource dependent
Debug Output
Example debug output (note lack of error message after error code on last line):
Expected Behavior
In affected resources, Terraform AWS Provider outputs error messages and retries on certain errors. e.g. those resources affected by new lack of ability to retry properly:
aws_cloud9_environment_ec2
resource, unable to retry for IAM eventual consistency onNotFoundException
during creation (https://github.com/terraform-providers/terraform-provider-aws/blob/96840caea28e3abf72d0d994550d2ee7d4b7fc45/aws/resource_aws_cloud9_environment_ec2.go#L96-L98)aws_cloudtrail
resource, unable to retry for CloudWatch Logs eventual consistency onInvalidCloudWatchLogsRoleArnException
andInvalidCloudWatchLogsLogGroupArnException
during creation or update (https://github.com/terraform-providers/terraform-provider-aws/blob/96840caea28e3abf72d0d994550d2ee7d4b7fc45/aws/resource_aws_cloudtrail.go#L186-L191)aws_cloudwatch_log_destination
resource, unable to retry forInvalidParameterException
with test message delivery during creation or update (https://github.com/terraform-providers/terraform-provider-aws/blob/96840caea28e3abf72d0d994550d2ee7d4b7fc45/aws/resource_aws_cloudwatch_log_destination.go#L70-L72)aws_cloudwatch_log_subscription
resource, unable to retry forInvalidParameterException
with test message delivery and Lambda Function execution during creation (https://github.com/terraform-providers/terraform-provider-aws/blob/96840caea28e3abf72d0d994550d2ee7d4b7fc45/aws/resource_aws_cloudwatch_log_subscription_filter.go#L71-L76)aws_codebuild_project
resource, unable to retry for IAM eventual consistency onInvalidInputException
during creation and update (https://github.com/terraform-providers/terraform-provider-aws/blob/96840caea28e3abf72d0d994550d2ee7d4b7fc45/aws/resource_aws_codebuild_project.go#L665-L669)aws_codedeploy_deployment_group
resource, unable to retry for SNS Topic eventual consistency onInvalidTriggerConfigException
during creation and update (https://github.com/terraform-providers/terraform-provider-aws/blob/96840caea28e3abf72d0d994550d2ee7d4b7fc45/aws/resource_aws_codedeploy_deployment_group.go#L783-L788)aws_config_delivery_channel
resource, unable to retry for running Config Configuration Recorder onLastDeliveryChannelDeleteFailedException
during deletion (https://github.com/terraform-providers/terraform-provider-aws/blob/96840caea28e3abf72d0d994550d2ee7d4b7fc45/aws/resource_aws_config_delivery_channel.go#L172-L174)aws_ecs_service
resource, unable to retry for cross-service eventual consistency onInvalidParameterException
during creation and update (https://github.com/terraform-providers/terraform-provider-aws/blob/96840caea28e3abf72d0d994550d2ee7d4b7fc45/aws/resource_aws_ecs_service.go#L524-L533)aws_elasticsearch_domain
resource, unable to retry for various eventual consistency errors onInvalidTypeException
/ValidationException
during creation (https://github.com/terraform-providers/terraform-provider-aws/blob/96840caea28e3abf72d0d994550d2ee7d4b7fc45/aws/resource_aws_elasticsearch_domain.go#L459-L474)Historically, we have preferred to check specific error messaging from the service API responses since the error code itself is not descriptive enough to determine if the error could/should be retried. While the service APIs should likely introduce more granular error codes and fix their API models, the unexpected removal of the error messaging represents a fairly problematic change in the AWS Go SDK since it was previously supported by many services.
Actual Behavior
Error messages (after the error code and colon when printed) are missing (an empty string). Retries in certain resources are not performed as expected since the error message conditions are no longer true.
Steps to Reproduce
terraform apply
Important Factoids
Changes in v1.28.0 of the AWS Go SDK (imported and released by Terraform AWS Provider version 2.45.0) introduced code generated types for certain service error shapes, which can be used to extract additional information provided by the API response. Prior to these code generated types, most (if not all) of these errors returned the correct error messaging via
Message()
via themessage
protocol response field. However after this change, since some of these error shapes in the service API models are incorrectly missing theMessage
structure member, this causes theMessage_
(Go struct type) to be missing, which causes the error message viaMessage()
to always be empty.An example of this missing error messaging can be seen with
codebuild
serviceInvalidInputException
shape:https://github.com/aws/aws-sdk-go/blob/6627e8938cdef5476dec0510b524258d3bf3983e/models/apis/codebuild/2016-10-06/api-2.json#L998-L1003
https://github.com/aws/aws-sdk-go/blob/6627e8938cdef5476dec0510b524258d3bf3983e/service/codebuild/api.go#L5333-L5336
Full SDK analysis of this new behavior was performed here: #11642 (comment)
References
The text was updated successfully, but these errors were encountered: