-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
resource/aws_emr_cluster: fix error on missing cluster #16924
Conversation
After a certain amount of time, destroyed EMR clusters completely disappear from AWS API output. They don't just display some deleted state, they're just gone. Currently, if you have one of these clusters in a statefile and you never update it in between the time when it was deleted and when it is purged from the API, terraform crashes the next time you try to run it. This patch fixes that.
(Note: the build updated a transitive dependency in |
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.
Will add a code comment in there since the message matching could mask some legitimate request errors, but as-is this follows our typical handling of this situation. Thanks, @apetresc 🚀
Output from acceptance testing:
--- PASS: TestAccAWSEMRCluster_configurationsJson (414.06s)
--- PASS: TestAccAWSEMRCluster_disappears (458.00s)
--- PASS: TestAccAWSEMRCluster_Kerberos_ClusterDedicatedKdc (458.66s)
--- PASS: TestAccAWSEMRCluster_additionalInfo (468.10s)
--- PASS: TestAccAWSEMRCluster_security_config (543.09s)
--- PASS: TestAccAWSEMRCluster_CoreInstanceGroup_InstanceCount (551.34s)
--- PASS: TestAccAWSEMRCluster_basic (611.02s)
--- PASS: TestAccAWSEMRCluster_CoreInstanceGroup_AutoscalingPolicy (643.71s)
--- PASS: TestAccAWSEMRCluster_Step_Multiple (682.41s)
--- PASS: TestAccAWSEMRCluster_keepJob (413.06s)
--- PASS: TestAccAWSEMRCluster_terminationProtected (466.42s)
--- PASS: TestAccAWSEMRCluster_Step_Basic (922.25s)
--- PASS: TestAccAWSEMRCluster_CoreInstanceGroup_InstanceType (922.69s)
--- PASS: TestAccAWSEMRCluster_Ec2Attributes_DefaultManagedSecurityGroups (923.50s)
--- PASS: TestAccAWSEMRCluster_MasterInstanceGroup_BidPrice (958.49s)
--- PASS: TestAccAWSEMRCluster_Step_ConfigMode (966.07s)
--- PASS: TestAccAWSEMRCluster_MasterInstanceGroup_InstanceType (987.75s)
--- PASS: TestAccAWSEMRCluster_MasterInstanceGroup_Name (989.32s)
--- PASS: TestAccAWSEMRCluster_CoreInstanceGroup_BidPrice (1020.07s)
--- PASS: TestAccAWSEMRCluster_CoreInstanceGroup_Name (1030.37s)
--- PASS: TestAccAWSEMRCluster_s3Logging (562.82s)
--- PASS: TestAccAWSEMRCluster_step_concurrency_level (471.16s)
--- PASS: TestAccAWSEMRCluster_ebs_config (449.44s)
--- PASS: TestAccAWSEMRCluster_MasterInstanceGroup_InstanceCount (1117.85s)
--- PASS: TestAccAWSEMRCluster_custom_ami_id (475.35s)
--- PASS: TestAccAWSEMRCluster_visibleToAllUsers (700.80s)
--- PASS: TestAccAWSEMRCluster_tags (734.40s)
--- PASS: TestAccAWSEMRCluster_root_volume_size (754.76s)
--- PASS: TestAccAWSEMRCluster_instance_fleet_master_only (456.76s)
--- PASS: TestAccAWSEMRCluster_bootstrap_ordering (1343.54s)
--- PASS: TestAccAWSEMRCluster_instance_fleet (563.45s)
This has been released in version 3.23.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! |
After a certain amount of time, destroyed EMR clusters completely disappear from AWS API output. They don't just display some deleted state, they're just gone.
DescribeClusters
that specifically target their ID return status400
withErrorCode: "NoSuchCluster"
.Currently, if you have one of these clusters in a statefile and you never update it in between the time when it was deleted and when it is purged from the API, terraform crashes the next time you try to run it, with an error such as this one:
This has been reported in, e.g, #7783.
This patch fixes that.
Community Note
Closes #7783.
Release note for CHANGELOG: