-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
S3-replication configuration rules: Error: rpc error: code = Unavailable desc = transport is closing #12480
Comments
…on blocks Reference: #11420 Reference: #12480 This does not contain a fully reproducible configuration for #12480 after a few timeboxed attempts, but left a test that adds `access_control_translation` since that most closely mimics what was reported and was previously untested. The addition of an empty configuration block in the plan difference appears to be a bug in the Terraform Plugin SDK or Terraform core logic. If/when these various S3 configurations are potentially moved to their own resources, we should try to remove the Set hashing functions then. Generally they are unnecessary except in specific situations. Previously: ``` === CONT TestAccAWSS3Bucket_LifecycleRule_Expiration_EmptyConfigurationBlock panic: interface conversion: interface {} is nil, not map[string]interface {} goroutine 228 [running]: github.com/terraform-providers/terraform-provider-aws/aws.expirationHash(0x0, 0x0, 0xc000e4bf10) /Users/bflad/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go:2503 +0x3d6 github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Set).hash(0xc000e4bf00, 0x0, 0x0, 0x746172697078652e, 0x2e302e6e6f69) /Users/bflad/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.8.0/helper/schema/set.go:221 +0x3d ``` Output from acceptance testing: ``` --- PASS: TestAccAWSS3Bucket_acceleration (62.39s) --- PASS: TestAccAWSS3Bucket_AclToGrant (62.44s) --- PASS: TestAccAWSS3Bucket_basic (37.44s) --- PASS: TestAccAWSS3Bucket_Bucket_EmptyString (35.25s) --- PASS: TestAccAWSS3Bucket_Cors_Delete (30.46s) --- PASS: TestAccAWSS3Bucket_Cors_EmptyOrigin (37.46s) --- PASS: TestAccAWSS3Bucket_Cors_Update (64.62s) --- PASS: TestAccAWSS3Bucket_disableDefaultEncryption_whenDefaultEncryptionIsEnabled (62.63s) --- PASS: TestAccAWSS3Bucket_enableDefaultEncryption_whenAES256IsUsed (36.77s) --- PASS: TestAccAWSS3Bucket_enableDefaultEncryption_whenTypical (64.54s) --- PASS: TestAccAWSS3Bucket_forceDestroy (34.28s) --- PASS: TestAccAWSS3Bucket_forceDestroyWithEmptyPrefixes (33.82s) --- PASS: TestAccAWSS3Bucket_forceDestroyWithObjectLockEnabled (40.74s) --- PASS: TestAccAWSS3Bucket_generatedName (34.28s) --- PASS: TestAccAWSS3Bucket_GrantToAcl (55.10s) --- PASS: TestAccAWSS3Bucket_LifecycleBasic (85.90s) --- PASS: TestAccAWSS3Bucket_LifecycleExpireMarkerOnly (60.69s) --- PASS: TestAccAWSS3Bucket_LifecycleRule_Expiration_EmptyConfigurationBlock (29.75s) --- PASS: TestAccAWSS3Bucket_Logging (53.50s) --- PASS: TestAccAWSS3Bucket_namePrefix (34.09s) --- PASS: TestAccAWSS3Bucket_objectLock (61.56s) --- PASS: TestAccAWSS3Bucket_Policy (88.91s) --- PASS: TestAccAWSS3Bucket_region (35.91s) --- PASS: TestAccAWSS3Bucket_Replication (173.40s) --- PASS: TestAccAWSS3Bucket_ReplicationConfiguration_Rule_Destination_AccessControlTranslation (109.21s) --- PASS: TestAccAWSS3Bucket_ReplicationConfiguration_Rule_Destination_AddAccessControlTranslation (87.98s) --- PASS: TestAccAWSS3Bucket_ReplicationExpectVersioningValidationError (27.38s) --- PASS: TestAccAWSS3Bucket_ReplicationSchemaV2 (150.14s) --- PASS: TestAccAWSS3Bucket_ReplicationWithoutPrefix (51.20s) --- PASS: TestAccAWSS3Bucket_ReplicationWithoutStorageClass (51.04s) --- PASS: TestAccAWSS3Bucket_RequestPayer (61.18s) --- PASS: TestAccAWSS3Bucket_shouldFailNotFound (17.00s) --- PASS: TestAccAWSS3Bucket_tagsWithNoSystemTags (114.98s) --- PASS: TestAccAWSS3Bucket_tagsWithSystemTags (148.05s) --- PASS: TestAccAWSS3Bucket_UpdateAcl (60.53s) --- PASS: TestAccAWSS3Bucket_UpdateGrant (90.89s) --- PASS: TestAccAWSS3Bucket_Versioning (89.97s) --- PASS: TestAccAWSS3Bucket_Website_Simple (89.17s) --- PASS: TestAccAWSS3Bucket_WebsiteRedirect (89.72s) --- PASS: TestAccAWSS3Bucket_WebsiteRoutingRules (63.15s) ```
Crash fix submitted: #12614 The underlying plan difference issue with an empty |
…on blocks (#12614) Reference: #11420 Reference: #12480 This does not contain a fully reproducible configuration for #12480 after a few timeboxed attempts, but left a test that adds `access_control_translation` since that most closely mimics what was reported and was previously untested. The addition of an empty configuration block in the plan difference appears to be a bug in the Terraform Plugin SDK or Terraform core logic. If/when these various S3 configurations are potentially moved to their own resources, we should try to remove the Set hashing functions then. Generally they are unnecessary except in specific situations. Previously: ``` === CONT TestAccAWSS3Bucket_LifecycleRule_Expiration_EmptyConfigurationBlock panic: interface conversion: interface {} is nil, not map[string]interface {} goroutine 228 [running]: github.com/terraform-providers/terraform-provider-aws/aws.expirationHash(0x0, 0x0, 0xc000e4bf10) /Users/bflad/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go:2503 +0x3d6 github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Set).hash(0xc000e4bf00, 0x0, 0x0, 0x746172697078652e, 0x2e302e6e6f69) /Users/bflad/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.8.0/helper/schema/set.go:221 +0x3d ``` Output from acceptance testing: ``` --- PASS: TestAccAWSS3Bucket_acceleration (62.39s) --- PASS: TestAccAWSS3Bucket_AclToGrant (62.44s) --- PASS: TestAccAWSS3Bucket_basic (37.44s) --- PASS: TestAccAWSS3Bucket_Bucket_EmptyString (35.25s) --- PASS: TestAccAWSS3Bucket_Cors_Delete (30.46s) --- PASS: TestAccAWSS3Bucket_Cors_EmptyOrigin (37.46s) --- PASS: TestAccAWSS3Bucket_Cors_Update (64.62s) --- PASS: TestAccAWSS3Bucket_disableDefaultEncryption_whenDefaultEncryptionIsEnabled (62.63s) --- PASS: TestAccAWSS3Bucket_enableDefaultEncryption_whenAES256IsUsed (36.77s) --- PASS: TestAccAWSS3Bucket_enableDefaultEncryption_whenTypical (64.54s) --- PASS: TestAccAWSS3Bucket_forceDestroy (34.28s) --- PASS: TestAccAWSS3Bucket_forceDestroyWithEmptyPrefixes (33.82s) --- PASS: TestAccAWSS3Bucket_forceDestroyWithObjectLockEnabled (40.74s) --- PASS: TestAccAWSS3Bucket_generatedName (34.28s) --- PASS: TestAccAWSS3Bucket_GrantToAcl (55.10s) --- PASS: TestAccAWSS3Bucket_LifecycleBasic (85.90s) --- PASS: TestAccAWSS3Bucket_LifecycleExpireMarkerOnly (60.69s) --- PASS: TestAccAWSS3Bucket_LifecycleRule_Expiration_EmptyConfigurationBlock (29.75s) --- PASS: TestAccAWSS3Bucket_Logging (53.50s) --- PASS: TestAccAWSS3Bucket_namePrefix (34.09s) --- PASS: TestAccAWSS3Bucket_objectLock (61.56s) --- PASS: TestAccAWSS3Bucket_Policy (88.91s) --- PASS: TestAccAWSS3Bucket_region (35.91s) --- PASS: TestAccAWSS3Bucket_Replication (173.40s) --- PASS: TestAccAWSS3Bucket_ReplicationConfiguration_Rule_Destination_AccessControlTranslation (109.21s) --- PASS: TestAccAWSS3Bucket_ReplicationConfiguration_Rule_Destination_AddAccessControlTranslation (87.98s) --- PASS: TestAccAWSS3Bucket_ReplicationExpectVersioningValidationError (27.38s) --- PASS: TestAccAWSS3Bucket_ReplicationSchemaV2 (150.14s) --- PASS: TestAccAWSS3Bucket_ReplicationWithoutPrefix (51.20s) --- PASS: TestAccAWSS3Bucket_ReplicationWithoutStorageClass (51.04s) --- PASS: TestAccAWSS3Bucket_RequestPayer (61.18s) --- PASS: TestAccAWSS3Bucket_shouldFailNotFound (17.00s) --- PASS: TestAccAWSS3Bucket_tagsWithNoSystemTags (114.98s) --- PASS: TestAccAWSS3Bucket_tagsWithSystemTags (148.05s) --- PASS: TestAccAWSS3Bucket_UpdateAcl (60.53s) --- PASS: TestAccAWSS3Bucket_UpdateGrant (90.89s) --- PASS: TestAccAWSS3Bucket_Versioning (89.97s) --- PASS: TestAccAWSS3Bucket_Website_Simple (89.17s) --- PASS: TestAccAWSS3Bucket_WebsiteRedirect (89.72s) --- PASS: TestAccAWSS3Bucket_WebsiteRoutingRules (63.15s) ```
The fix mentioned above has been merged and will release with version 2.56.0 of the Terraform AWS Provider, later this week. 👍 |
This has been released in version 2.56.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
v0.12.21
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
The S3 bucket replication configuration gets updated.
Actual Behavior
Terraform panic crash
Steps to Reproduce
terraform plan
to see the weird plan result for replication rulesterraform apply
to see the panic errorImportant Factoids
Please note that the plan before applying the changes looks weird in terms of replication rules, there's an empty⚠️
rule
config, probably the cause of the crashReferences
The text was updated successfully, but these errors were encountered: