-
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
r/aws_batch_compute_environment: Better error reporting when status is INVALID
#21281
r/aws_batch_compute_environment: Better error reporting when status is INVALID
#21281
Conversation
After manually changing the IAM role for those compute environments: % TEST=./aws SWEEP=us-east-1,us-east-2,us-west-1,us-west-2 SWEEPARGS=-sweep-run=aws_batch_compute_environment make sweep
WARNING: This will destroy infrastructure. Use only in development accounts.
go test ./aws -v -sweep=us-east-1,us-east-2,us-west-1,us-west-2 -sweep-run=aws_batch_compute_environment -timeout 60m
2021/10/13 14:25:03 [DEBUG] Running Sweepers for region (us-east-1):
2021/10/13 14:25:03 [DEBUG] Sweeper (aws_batch_compute_environment) has dependency (aws_batch_job_queue), running..
2021/10/13 14:25:03 [DEBUG] Running Sweeper (aws_batch_job_queue) in region (us-east-1)
2021/10/13 14:25:03 [INFO] AWS Auth provider used: "EnvProvider"
2021/10/13 14:25:03 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/10/13 14:25:03 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/10/13 14:25:04 [DEBUG] Completed Sweeper (aws_batch_job_queue) in region (us-east-1) in 1.766924966s
2021/10/13 14:25:04 [DEBUG] Running Sweeper (aws_batch_compute_environment) in region (us-east-1)
2021/10/13 14:25:04 [DEBUG] Completed Sweeper (aws_batch_compute_environment) in region (us-east-1) in 139.507451ms
2021/10/13 14:25:04 [DEBUG] Sweeper (aws_batch_job_queue) already ran in region (us-east-1)
2021/10/13 14:25:04 Completed Sweepers for region (us-east-1) in 1.906697812s
2021/10/13 14:25:04 Sweeper Tests for region (us-east-1) ran successfully:
- aws_batch_job_queue
- aws_batch_compute_environment
2021/10/13 14:25:04 [DEBUG] Running Sweepers for region (us-east-2):
2021/10/13 14:25:04 [DEBUG] Sweeper (aws_batch_compute_environment) has dependency (aws_batch_job_queue), running..
2021/10/13 14:25:04 [DEBUG] Running Sweeper (aws_batch_job_queue) in region (us-east-2)
2021/10/13 14:25:04 [INFO] AWS Auth provider used: "EnvProvider"
2021/10/13 14:25:04 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/10/13 14:25:05 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/10/13 14:25:05 [DEBUG] Completed Sweeper (aws_batch_job_queue) in region (us-east-2) in 529.749787ms
2021/10/13 14:25:05 [DEBUG] Running Sweeper (aws_batch_compute_environment) in region (us-east-2)
2021/10/13 14:25:05 [DEBUG] Completed Sweeper (aws_batch_compute_environment) in region (us-east-2) in 182.236757ms
2021/10/13 14:25:05 [DEBUG] Sweeper (aws_batch_job_queue) already ran in region (us-east-2)
2021/10/13 14:25:05 Completed Sweepers for region (us-east-2) in 712.318139ms
2021/10/13 14:25:05 Sweeper Tests for region (us-east-2) ran successfully:
- aws_batch_job_queue
- aws_batch_compute_environment
2021/10/13 14:25:05 [DEBUG] Running Sweepers for region (us-west-1):
2021/10/13 14:25:05 [DEBUG] Sweeper (aws_batch_compute_environment) has dependency (aws_batch_job_queue), running..
2021/10/13 14:25:05 [DEBUG] Running Sweeper (aws_batch_job_queue) in region (us-west-1)
2021/10/13 14:25:05 [INFO] AWS Auth provider used: "EnvProvider"
2021/10/13 14:25:05 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/10/13 14:25:05 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/10/13 14:25:06 [DEBUG] Completed Sweeper (aws_batch_job_queue) in region (us-west-1) in 1.061497539s
2021/10/13 14:25:06 [DEBUG] Running Sweeper (aws_batch_compute_environment) in region (us-west-1)
2021/10/13 14:25:07 [DEBUG] Completed Sweeper (aws_batch_compute_environment) in region (us-west-1) in 384.103807ms
2021/10/13 14:25:07 [DEBUG] Sweeper (aws_batch_job_queue) already ran in region (us-west-1)
2021/10/13 14:25:07 Completed Sweepers for region (us-west-1) in 1.445751682s
2021/10/13 14:25:07 Sweeper Tests for region (us-west-1) ran successfully:
- aws_batch_compute_environment
- aws_batch_job_queue
2021/10/13 14:25:07 [DEBUG] Running Sweepers for region (us-west-2):
2021/10/13 14:25:07 [DEBUG] Sweeper (aws_batch_compute_environment) has dependency (aws_batch_job_queue), running..
2021/10/13 14:25:07 [DEBUG] Running Sweeper (aws_batch_job_queue) in region (us-west-2)
2021/10/13 14:25:07 [INFO] AWS Auth provider used: "EnvProvider"
2021/10/13 14:25:07 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/10/13 14:25:07 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/10/13 14:25:08 [DEBUG] Completed Sweeper (aws_batch_job_queue) in region (us-west-2) in 1.15792365s
2021/10/13 14:25:08 [DEBUG] Running Sweeper (aws_batch_compute_environment) in region (us-west-2)
2021/10/13 14:25:08 [DEBUG] Disabling Batch Compute Environment (tf-acc-test-249518938014937002)
2021/10/13 14:25:09 [DEBUG] Waiting for state to become: [VALID]
2021/10/13 14:25:09 [DEBUG] Deleting Batch Compute Environment (tf-acc-test-249518938014937002)
2021/10/13 14:25:09 [DEBUG] Waiting for state to become: []
2021/10/13 14:25:10 [TRACE] Waiting 200ms before next try
2021/10/13 14:25:10 [DEBUG] Disabling Batch Compute Environment (tf-acc-test-9132376917071342612)
2021/10/13 14:25:11 [DEBUG] Waiting for state to become: [VALID]
2021/10/13 14:25:11 [DEBUG] Deleting Batch Compute Environment (tf-acc-test-9132376917071342612)
2021/10/13 14:25:12 [DEBUG] Waiting for state to become: []
2021/10/13 14:25:12 [TRACE] Waiting 200ms before next try
2021/10/13 14:25:13 [DEBUG] Disabling Batch Compute Environment (tf-acc-test-1705481823449091672)
2021/10/13 14:25:13 [DEBUG] Waiting for state to become: [VALID]
2021/10/13 14:25:14 [DEBUG] Deleting Batch Compute Environment (tf-acc-test-1705481823449091672)
2021/10/13 14:25:14 [DEBUG] Waiting for state to become: []
2021/10/13 14:25:14 [TRACE] Waiting 200ms before next try
2021/10/13 14:25:15 [DEBUG] Disabling Batch Compute Environment (tf-acc-test-7615333999760349610)
2021/10/13 14:25:16 [DEBUG] Waiting for state to become: [VALID]
2021/10/13 14:25:16 [DEBUG] Deleting Batch Compute Environment (tf-acc-test-7615333999760349610)
2021/10/13 14:25:17 [DEBUG] Waiting for state to become: []
2021/10/13 14:25:17 [TRACE] Waiting 200ms before next try
2021/10/13 14:25:18 [DEBUG] Disabling Batch Compute Environment (tf-acc-test-7492930073958672562)
2021/10/13 14:25:18 [DEBUG] Waiting for state to become: [VALID]
2021/10/13 14:25:18 [DEBUG] Deleting Batch Compute Environment (tf-acc-test-7492930073958672562)
2021/10/13 14:25:19 [DEBUG] Waiting for state to become: []
2021/10/13 14:25:19 [TRACE] Waiting 200ms before next try
2021/10/13 14:25:20 [DEBUG] Completed Sweeper (aws_batch_compute_environment) in region (us-west-2) in 12.104968785s
2021/10/13 14:25:20 [DEBUG] Sweeper (aws_batch_job_queue) already ran in region (us-west-2)
2021/10/13 14:25:20 Completed Sweepers for region (us-west-2) in 13.263281459s
2021/10/13 14:25:20 Sweeper Tests for region (us-west-2) ran successfully:
- aws_batch_job_queue
- aws_batch_compute_environment
ok github.com/terraform-providers/terraform-provider-aws/aws 20.461s |
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.
Looks good! 🎉
Output from acceptance tests (us-west-2
):
--- PASS: TestAccAWSBatchComputeEnvironment_createEc2WithoutComputeResources (25.05s)
--- SKIP: TestAccAWSBatchComputeEnvironment_defaultServiceRole (0.51s)
--- PASS: TestAccAWSBatchComputeEnvironment_createSpotWithoutIamFleetRole (35.96s)
--- PASS: TestAccAWSBatchComputeEnvironment_createFargate (40.91s)
--- PASS: TestAccAWSBatchComputeEnvironment_createUnmanagedWithComputeResources (43.01s)
--- PASS: TestAccAWSBatchComputeEnvironment_createSpot_AllocationStrategy_BidPercentage (52.80s)
--- PASS: TestAccAWSBatchComputeEnvironment_createEc2 (54.01s)
--- PASS: TestAccAWSBatchComputeEnvironment_NamePrefix (55.52s)
--- PASS: TestAccAWSBatchComputeEnvironment_basic (58.97s)
--- PASS: TestAccAWSBatchComputeEnvironment_launchTemplate (60.61s)
--- PASS: TestAccAWSBatchComputeEnvironment_disappears (36.08s)
--- PASS: TestAccAWSBatchComputeEnvironment_createFargateSpot (71.70s)
--- PASS: TestAccAWSBatchComputeEnvironment_UpdateSecurityGroupsAndSubnets_Fargate (71.71s)
--- PASS: TestAccAWSBatchComputeEnvironment_UpdateLaunchTemplate (74.80s)
--- PASS: TestAccAWSBatchComputeEnvironment_NameGenerated (81.67s)
--- PASS: TestAccAWSBatchComputeEnvironment_updateState (83.21s)
--- PASS: TestAccAWSBatchComputeEnvironment_Tags (100.23s)
--- PASS: TestAccAWSBatchComputeEnvironment_ComputeResources_MaxVcpus (103.30s)
--- PASS: TestAccAWSBatchComputeEnvironment_updateServiceRole (124.87s)
--- PASS: TestAccAWSBatchComputeEnvironment_ComputeResources_MinVcpus (172.55s)
--- PASS: TestAccAWSBatchComputeEnvironment_createEc2_DesiredVcpus_Ec2KeyPair_ImageId_ComputeResourcesTags (177.48s)
--- PASS: TestAccAWSBatchComputeEnvironment_createSpot (471.50s)
This functionality has been released in v3.63.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. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Closes #21262.
Closes #8549.