Skip to content
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

b/aws_batch_compute_environment: security_group_ids optional #26172

Merged

Conversation

cjtroiano
Copy link

@cjtroiano cjtroiano commented Aug 8, 2022

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #25801

Output from acceptance testing:

$ make testacc TESTS=TestAcc* PKG=batch
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/batch/... -v -count 1 -parallel 1 -run='TestAcc*'  -timeout 180m
=== RUN   TestAccBatchComputeEnvironmentDataSource_basic
=== PAUSE TestAccBatchComputeEnvironmentDataSource_basic
=== RUN   TestAccBatchComputeEnvironment_basic
=== PAUSE TestAccBatchComputeEnvironment_basic
=== RUN   TestAccBatchComputeEnvironment_disappears
=== PAUSE TestAccBatchComputeEnvironment_disappears
=== RUN   TestAccBatchComputeEnvironment_nameGenerated
=== PAUSE TestAccBatchComputeEnvironment_nameGenerated
=== RUN   TestAccBatchComputeEnvironment_namePrefix
=== PAUSE TestAccBatchComputeEnvironment_namePrefix
=== RUN   TestAccBatchComputeEnvironment_createEC2
=== PAUSE TestAccBatchComputeEnvironment_createEC2
=== RUN   TestAccBatchComputeEnvironment_CreateEC2DesiredVCPUsEC2KeyPairImageID_computeResourcesTags
=== PAUSE TestAccBatchComputeEnvironment_CreateEC2DesiredVCPUsEC2KeyPairImageID_computeResourcesTags
=== RUN   TestAccBatchComputeEnvironment_createSpot
=== PAUSE TestAccBatchComputeEnvironment_createSpot
=== RUN   TestAccBatchComputeEnvironment_CreateSpotAllocationStrategy_bidPercentage
=== PAUSE TestAccBatchComputeEnvironment_CreateSpotAllocationStrategy_bidPercentage
=== RUN   TestAccBatchComputeEnvironment_createFargate
=== PAUSE TestAccBatchComputeEnvironment_createFargate
=== RUN   TestAccBatchComputeEnvironment_createFargateSpot
=== PAUSE TestAccBatchComputeEnvironment_createFargateSpot
=== RUN   TestAccBatchComputeEnvironment_updateState
=== PAUSE TestAccBatchComputeEnvironment_updateState
=== RUN   TestAccBatchComputeEnvironment_updateServiceRole
=== PAUSE TestAccBatchComputeEnvironment_updateServiceRole
=== RUN   TestAccBatchComputeEnvironment_defaultServiceRole
=== PAUSE TestAccBatchComputeEnvironment_defaultServiceRole
=== RUN   TestAccBatchComputeEnvironment_ComputeResources_minVCPUs
=== PAUSE TestAccBatchComputeEnvironment_ComputeResources_minVCPUs
=== RUN   TestAccBatchComputeEnvironment_ComputeResources_maxVCPUs
=== PAUSE TestAccBatchComputeEnvironment_ComputeResources_maxVCPUs
=== RUN   TestAccBatchComputeEnvironment_ec2Configuration
=== PAUSE TestAccBatchComputeEnvironment_ec2Configuration
=== RUN   TestAccBatchComputeEnvironment_launchTemplate
=== PAUSE TestAccBatchComputeEnvironment_launchTemplate
=== RUN   TestAccBatchComputeEnvironment_updateLaunchTemplate
=== PAUSE TestAccBatchComputeEnvironment_updateLaunchTemplate
=== RUN   TestAccBatchComputeEnvironment_UpdateSecurityGroupsAndSubnets_fargate
=== PAUSE TestAccBatchComputeEnvironment_UpdateSecurityGroupsAndSubnets_fargate
=== RUN   TestAccBatchComputeEnvironment_tags
=== PAUSE TestAccBatchComputeEnvironment_tags
=== RUN   TestAccBatchComputeEnvironment_createUnmanagedWithComputeResources
=== PAUSE TestAccBatchComputeEnvironment_createUnmanagedWithComputeResources
=== RUN   TestAccBatchComputeEnvironment_createEC2WithoutComputeResources
=== PAUSE TestAccBatchComputeEnvironment_createEC2WithoutComputeResources
=== RUN   TestAccBatchComputeEnvironment_createSpotWithoutIAMFleetRole
=== PAUSE TestAccBatchComputeEnvironment_createSpotWithoutIAMFleetRole
=== RUN   TestAccBatchJobDefinition_basic
=== PAUSE TestAccBatchJobDefinition_basic
=== RUN   TestAccBatchJobDefinition_disappears
=== PAUSE TestAccBatchJobDefinition_disappears
=== RUN   TestAccBatchJobDefinition_PlatformCapabilities_ec2
=== PAUSE TestAccBatchJobDefinition_PlatformCapabilities_ec2
=== RUN   TestAccBatchJobDefinition_PlatformCapabilitiesFargate_containerPropertiesDefaults
=== PAUSE TestAccBatchJobDefinition_PlatformCapabilitiesFargate_containerPropertiesDefaults
=== RUN   TestAccBatchJobDefinition_PlatformCapabilities_fargate
=== PAUSE TestAccBatchJobDefinition_PlatformCapabilities_fargate
=== RUN   TestAccBatchJobDefinition_ContainerProperties_advanced
=== PAUSE TestAccBatchJobDefinition_ContainerProperties_advanced
=== RUN   TestAccBatchJobDefinition_updateForcesNewResource
=== PAUSE TestAccBatchJobDefinition_updateForcesNewResource
=== RUN   TestAccBatchJobDefinition_tags
=== PAUSE TestAccBatchJobDefinition_tags
=== RUN   TestAccBatchJobDefinition_propagateTags
=== PAUSE TestAccBatchJobDefinition_propagateTags
=== RUN   TestAccBatchJobQueueDataSource_basic
=== PAUSE TestAccBatchJobQueueDataSource_basic
=== RUN   TestAccBatchJobQueueDataSource_schedulingPolicy
=== PAUSE TestAccBatchJobQueueDataSource_schedulingPolicy
=== RUN   TestAccBatchJobQueue_basic
=== PAUSE TestAccBatchJobQueue_basic
=== RUN   TestAccBatchJobQueue_disappears
=== PAUSE TestAccBatchJobQueue_disappears
=== RUN   TestAccBatchJobQueue_ComputeEnvironments_externalOrderUpdate
=== PAUSE TestAccBatchJobQueue_ComputeEnvironments_externalOrderUpdate
=== RUN   TestAccBatchJobQueue_priority
=== PAUSE TestAccBatchJobQueue_priority
=== RUN   TestAccBatchJobQueue_schedulingPolicy
=== PAUSE TestAccBatchJobQueue_schedulingPolicy
=== RUN   TestAccBatchJobQueue_state
=== PAUSE TestAccBatchJobQueue_state
=== RUN   TestAccBatchJobQueue_tags
=== PAUSE TestAccBatchJobQueue_tags
=== RUN   TestAccBatchSchedulingPolicyDataSource_basic
--- PASS: TestAccBatchSchedulingPolicyDataSource_basic (9.06s)
=== RUN   TestAccBatchSchedulingPolicy_basic
=== PAUSE TestAccBatchSchedulingPolicy_basic
=== RUN   TestAccBatchSchedulingPolicy_disappears
=== PAUSE TestAccBatchSchedulingPolicy_disappears
=== CONT  TestAccBatchComputeEnvironmentDataSource_basic
--- PASS: TestAccBatchComputeEnvironmentDataSource_basic (40.49s)
=== CONT  TestAccBatchComputeEnvironment_createEC2WithoutComputeResources
--- PASS: TestAccBatchComputeEnvironment_createEC2WithoutComputeResources (9.30s)
=== CONT  TestAccBatchSchedulingPolicy_disappears
--- PASS: TestAccBatchSchedulingPolicy_disappears (6.85s)
=== CONT  TestAccBatchSchedulingPolicy_basic
--- PASS: TestAccBatchSchedulingPolicy_basic (17.61s)
=== CONT  TestAccBatchJobQueue_tags
--- PASS: TestAccBatchJobQueue_tags (153.72s)
=== CONT  TestAccBatchJobQueue_state
--- PASS: TestAccBatchJobQueue_state (153.51s)
=== CONT  TestAccBatchJobQueue_schedulingPolicy
--- PASS: TestAccBatchJobQueue_schedulingPolicy (123.99s)
=== CONT  TestAccBatchJobQueue_priority
--- PASS: TestAccBatchJobQueue_priority (122.29s)
=== CONT  TestAccBatchComputeEnvironment_updateState
--- PASS: TestAccBatchComputeEnvironment_updateState (47.25s)
=== CONT  TestAccBatchComputeEnvironment_createUnmanagedWithComputeResources
--- PASS: TestAccBatchComputeEnvironment_createUnmanagedWithComputeResources (1.09s)
=== CONT  TestAccBatchJobQueue_ComputeEnvironments_externalOrderUpdate
--- PASS: TestAccBatchJobQueue_ComputeEnvironments_externalOrderUpdate (113.63s)
=== CONT  TestAccBatchJobQueue_disappears
--- PASS: TestAccBatchJobQueue_disappears (103.02s)
=== CONT  TestAccBatchJobQueue_basic
--- PASS: TestAccBatchJobQueue_basic (114.03s)
=== CONT  TestAccBatchJobQueueDataSource_schedulingPolicy
--- PASS: TestAccBatchJobQueueDataSource_schedulingPolicy (124.97s)
=== CONT  TestAccBatchJobQueueDataSource_basic
--- PASS: TestAccBatchJobQueueDataSource_basic (121.20s)
=== CONT  TestAccBatchJobDefinition_propagateTags
--- PASS: TestAccBatchJobDefinition_propagateTags (8.17s)
=== CONT  TestAccBatchJobDefinition_tags
--- PASS: TestAccBatchJobDefinition_tags (22.26s)
=== CONT  TestAccBatchJobDefinition_updateForcesNewResource
--- PASS: TestAccBatchJobDefinition_updateForcesNewResource (27.81s)
=== CONT  TestAccBatchComputeEnvironment_tags
--- PASS: TestAccBatchComputeEnvironment_tags (54.95s)
=== CONT  TestAccBatchJobDefinition_ContainerProperties_advanced
--- PASS: TestAccBatchJobDefinition_ContainerProperties_advanced (9.42s)
=== CONT  TestAccBatchJobDefinition_PlatformCapabilities_fargate
--- PASS: TestAccBatchJobDefinition_PlatformCapabilities_fargate (12.58s)
=== CONT  TestAccBatchJobDefinition_PlatformCapabilitiesFargate_containerPropertiesDefaults
--- PASS: TestAccBatchJobDefinition_PlatformCapabilitiesFargate_containerPropertiesDefaults (12.19s)
=== CONT  TestAccBatchJobDefinition_PlatformCapabilities_ec2
--- PASS: TestAccBatchJobDefinition_PlatformCapabilities_ec2 (9.67s)
=== CONT  TestAccBatchComputeEnvironment_ComputeResources_maxVCPUs
--- PASS: TestAccBatchComputeEnvironment_ComputeResources_maxVCPUs (57.30s)
=== CONT  TestAccBatchComputeEnvironment_ec2Configuration
--- PASS: TestAccBatchComputeEnvironment_ec2Configuration (44.04s)
=== CONT  TestAccBatchComputeEnvironment_ComputeResources_minVCPUs
--- PASS: TestAccBatchComputeEnvironment_ComputeResources_minVCPUs (295.36s)
=== CONT  TestAccBatchComputeEnvironment_UpdateSecurityGroupsAndSubnets_fargate
--- PASS: TestAccBatchComputeEnvironment_UpdateSecurityGroupsAndSubnets_fargate (55.85s)
=== CONT  TestAccBatchComputeEnvironment_defaultServiceRole
    acctest.go:802: skipping tests; missing IAM service-linked role /aws-service-role/batch. Please create the role and retry
--- SKIP: TestAccBatchComputeEnvironment_defaultServiceRole (0.45s)
=== CONT  TestAccBatchJobDefinition_disappears
--- PASS: TestAccBatchJobDefinition_disappears (7.00s)
=== CONT  TestAccBatchComputeEnvironment_CreateEC2DesiredVCPUsEC2KeyPairImageID_computeResourcesTags
--- PASS: TestAccBatchComputeEnvironment_CreateEC2DesiredVCPUsEC2KeyPairImageID_computeResourcesTags (139.98s)
=== CONT  TestAccBatchJobDefinition_basic
--- PASS: TestAccBatchJobDefinition_basic (9.76s)
=== CONT  TestAccBatchComputeEnvironment_createFargateSpot
--- PASS: TestAccBatchComputeEnvironment_createFargateSpot (42.30s)
=== CONT  TestAccBatchComputeEnvironment_createSpotWithoutIAMFleetRole
--- PASS: TestAccBatchComputeEnvironment_createSpotWithoutIAMFleetRole (11.13s)
=== CONT  TestAccBatchComputeEnvironment_createFargate
--- PASS: TestAccBatchComputeEnvironment_createFargate (43.13s)
=== CONT  TestAccBatchComputeEnvironment_CreateSpotAllocationStrategy_bidPercentage
--- PASS: TestAccBatchComputeEnvironment_CreateSpotAllocationStrategy_bidPercentage (32.89s)
=== CONT  TestAccBatchComputeEnvironment_createSpot
--- PASS: TestAccBatchComputeEnvironment_createSpot (452.55s)
=== CONT  TestAccBatchComputeEnvironment_launchTemplate
--- PASS: TestAccBatchComputeEnvironment_launchTemplate (32.57s)
=== CONT  TestAccBatchComputeEnvironment_updateServiceRole
--- PASS: TestAccBatchComputeEnvironment_updateServiceRole (76.20s)
=== CONT  TestAccBatchComputeEnvironment_createEC2
--- PASS: TestAccBatchComputeEnvironment_createEC2 (42.61s)
=== CONT  TestAccBatchComputeEnvironment_namePrefix
--- PASS: TestAccBatchComputeEnvironment_namePrefix (37.24s)
=== CONT  TestAccBatchComputeEnvironment_updateLaunchTemplate
--- PASS: TestAccBatchComputeEnvironment_updateLaunchTemplate (61.87s)
=== CONT  TestAccBatchComputeEnvironment_disappears
--- PASS: TestAccBatchComputeEnvironment_disappears (36.91s)
=== CONT  TestAccBatchComputeEnvironment_nameGenerated
--- PASS: TestAccBatchComputeEnvironment_nameGenerated (37.08s)
=== CONT  TestAccBatchComputeEnvironment_basic
--- PASS: TestAccBatchComputeEnvironment_basic (35.88s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/batch	2972.819s

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. documentation Introduces or discusses updates to documentation. service/batch Issues and PRs that pertain to the batch service. size/XS Managed by automation to categorize the size of a PR. labels Aug 8, 2022
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome @cjtroiano 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@bigbitbus
Copy link

Is this getting merged and released soon? I am hitting the same issue

@justinretzolk justinretzolk added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Aug 18, 2022
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀.

% make testacc TESTARGS='-run=TestAccBatchComputeEnvironment_launchTemplate' PKG=batch ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/batch/... -v -count 1 -parallel 2  -run=TestAccBatchComputeEnvironment_launchTemplate -timeout 180m
=== RUN   TestAccBatchComputeEnvironment_launchTemplate
=== PAUSE TestAccBatchComputeEnvironment_launchTemplate
=== CONT  TestAccBatchComputeEnvironment_launchTemplate
--- PASS: TestAccBatchComputeEnvironment_launchTemplate (57.06s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/batch	61.454s

@github-actions github-actions bot added size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. and removed size/XS Managed by automation to categorize the size of a PR. labels Nov 1, 2022
@ewbankkit
Copy link
Contributor

@cjtroiano Thanks for the contribution 🎉 👏.
I tweaked the TestAccBatchComputeEnvironment_launchTemplate acceptance tests to test that security_group_ids do not have to be configured.

@ewbankkit ewbankkit merged commit 929e030 into hashicorp:main Nov 1, 2022
@github-actions github-actions bot added this to the v4.38.0 milestone Nov 1, 2022
@github-actions
Copy link

github-actions bot commented Nov 3, 2022

This functionality has been released in v4.38.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!

@github-actions
Copy link

github-actions bot commented Dec 4, 2022

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. documentation Introduces or discusses updates to documentation. service/batch Issues and PRs that pertain to the batch service. size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error creating compute environment for aws batch
5 participants