-
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
Error: One compute environment is expected, but AWS return no compute environment #12337
Comments
I've had the same error occur when I removed an AWS Batch compute env. manually and then tried to recreate/refresh it. Because of coupling between aws batch components such as job queues and compute environments, I first had to manually add another aws batch compute environment with the same name as the one manually deleted, then marked the env's with |
…m state when not found instead of returning error Reference: https://github.com/terraform-providers/terraform-provider-aws/blob/master/docs/contributing/running-and-writing-acceptance-tests.md#disappears-acceptance-tests Reference: #12337 Reference: #13826 Previously: ``` === CONT TestAccAWSBatchComputeEnvironment_disappears TestAccAWSBatchComputeEnvironment_disappears: testing.go:684: Step 0 error: errors during follow-up refresh: Error: One compute environment is expected, but AWS return no compute environment TestAccAWSBatchComputeEnvironment_disappears: testing.go:745: Error destroying resource! WARNING: Dangling resources may exist. The full state and error is shown below. Error: errors during refresh: One compute environment is expected, but AWS return no compute environment State: <nil> --- FAIL: TestAccAWSBatchComputeEnvironment_disappears (59.70s) ``` Output from acceptance testing: ``` --- PASS: TestAccAWSBatchComputeEnvironment_createEc2WithoutComputeResources (35.53s) --- PASS: TestAccAWSBatchComputeEnvironment_createSpotWithoutBidPercentage (35.72s) --- PASS: TestAccAWSBatchComputeEnvironment_createWithNamePrefix (64.40s) --- PASS: TestAccAWSBatchComputeEnvironment_createUnmanagedWithComputeResources (67.27s) --- PASS: TestAccAWSBatchComputeEnvironment_createUnmanaged (67.28s) --- PASS: TestAccAWSBatchComputeEnvironment_disappears (71.92s) --- PASS: TestAccAWSBatchComputeEnvironment_launchTemplate (72.52s) --- PASS: TestAccAWSBatchComputeEnvironment_createSpot (72.67s) --- PASS: TestAccAWSBatchComputeEnvironment_createSpotWithAllocationStrategy (74.33s) --- PASS: TestAccAWSBatchComputeEnvironment_createEc2 (80.45s) --- PASS: TestAccAWSBatchComputeEnvironment_createEc2WithTags (81.01s) --- PASS: TestAccAWSBatchComputeEnvironment_updateState (93.78s) --- PASS: TestAccAWSBatchComputeEnvironment_updateInstanceType (105.25s) --- PASS: TestAccAWSBatchComputeEnvironment_updateComputeEnvironmentName (114.21s) --- PASS: TestAccAWSBatchComputeEnvironment_UpdateLaunchTemplate (114.41s) --- PASS: TestAccAWSBatchComputeEnvironment_ComputeResources_MaxVcpus (135.46s) --- PASS: TestAccAWSBatchComputeEnvironment_ComputeResources_DesiredVcpus_Computed (171.29s) --- PASS: TestAccAWSBatchComputeEnvironment_ComputeResources_MinVcpus (216.35s) ```
Fix submitted: #13935 |
…m state when not found instead of returning error (#13935) Reference: https://github.com/terraform-providers/terraform-provider-aws/blob/master/docs/contributing/running-and-writing-acceptance-tests.md#disappears-acceptance-tests Reference: #12337 Reference: #13826 Previously: ``` === CONT TestAccAWSBatchComputeEnvironment_disappears TestAccAWSBatchComputeEnvironment_disappears: testing.go:684: Step 0 error: errors during follow-up refresh: Error: One compute environment is expected, but AWS return no compute environment TestAccAWSBatchComputeEnvironment_disappears: testing.go:745: Error destroying resource! WARNING: Dangling resources may exist. The full state and error is shown below. Error: errors during refresh: One compute environment is expected, but AWS return no compute environment State: <nil> --- FAIL: TestAccAWSBatchComputeEnvironment_disappears (59.70s) ``` Output from acceptance testing: ``` --- PASS: TestAccAWSBatchComputeEnvironment_createEc2WithoutComputeResources (35.53s) --- PASS: TestAccAWSBatchComputeEnvironment_createSpotWithoutBidPercentage (35.72s) --- PASS: TestAccAWSBatchComputeEnvironment_createWithNamePrefix (64.40s) --- PASS: TestAccAWSBatchComputeEnvironment_createUnmanagedWithComputeResources (67.27s) --- PASS: TestAccAWSBatchComputeEnvironment_createUnmanaged (67.28s) --- PASS: TestAccAWSBatchComputeEnvironment_disappears (71.92s) --- PASS: TestAccAWSBatchComputeEnvironment_launchTemplate (72.52s) --- PASS: TestAccAWSBatchComputeEnvironment_createSpot (72.67s) --- PASS: TestAccAWSBatchComputeEnvironment_createSpotWithAllocationStrategy (74.33s) --- PASS: TestAccAWSBatchComputeEnvironment_createEc2 (80.45s) --- PASS: TestAccAWSBatchComputeEnvironment_createEc2WithTags (81.01s) --- PASS: TestAccAWSBatchComputeEnvironment_updateState (93.78s) --- PASS: TestAccAWSBatchComputeEnvironment_updateInstanceType (105.25s) --- PASS: TestAccAWSBatchComputeEnvironment_updateComputeEnvironmentName (114.21s) --- PASS: TestAccAWSBatchComputeEnvironment_UpdateLaunchTemplate (114.41s) --- PASS: TestAccAWSBatchComputeEnvironment_ComputeResources_MaxVcpus (135.46s) --- PASS: TestAccAWSBatchComputeEnvironment_ComputeResources_DesiredVcpus_Computed (171.29s) --- PASS: TestAccAWSBatchComputeEnvironment_ComputeResources_MinVcpus (216.35s) ```
The fix for this has been merged and will be released with version 2.68.0 of the Terraform AWS Provider, likely later today. 👍 |
This has been released in version 2.68.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! |
Cannot create an aws batch environment with the following script. Was working perfectly before I made some changes in the name of the environment.
Community Note
Terraform Version
Terraform v0.12.21
Affected Resource(s)
AWS BATCH
Terraform Configuration Files
Debug Output
Panic Output
Error: One compute environment is expected, but AWS return no compute environment
Expected Behavior
Batch environment should have been created
Actual Behavior
Error: One compute environment is expected, but AWS return no compute environment
Steps to Reproduce
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: