Skip to content

Conversation

tabito-hara
Copy link
Contributor

@tabito-hara tabito-hara commented Jul 18, 2025

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the library.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

Description

  • Added the instance_type argument to the compute_configuration block of the aws_codebuild_fleet resource, as well as to the aws_codebuild_fleet data source, to support custom instance types in fleets.

Relations

Closes #43384

References

https://docs.aws.amazon.com/codebuild/latest/APIReference/API_CreateFleet.html

Output from Acceptance Testing

$ make testacc TESTS=TestAccCodeBuildFleet_ PKG=codebuild               
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.24.5 test ./internal/service/codebuild/... -v -count 1 -parallel 20 -run='TestAccCodeBuildFleet_'  -timeout 360m -vet=off
2025/07/19 00:30:39 Creating Terraform AWS Provider (SDKv2-style)...
2025/07/19 00:30:39 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccCodeBuildFleet_Identity_Basic
=== PAUSE TestAccCodeBuildFleet_Identity_Basic
=== RUN   TestAccCodeBuildFleet_Identity_RegionOverride
=== PAUSE TestAccCodeBuildFleet_Identity_RegionOverride
=== RUN   TestAccCodeBuildFleet_Identity_ExistingResource
=== PAUSE TestAccCodeBuildFleet_Identity_ExistingResource
=== RUN   TestAccCodeBuildFleet_basic
=== PAUSE TestAccCodeBuildFleet_basic
=== RUN   TestAccCodeBuildFleet_disappears
=== PAUSE TestAccCodeBuildFleet_disappears
=== RUN   TestAccCodeBuildFleet_tags
=== PAUSE TestAccCodeBuildFleet_tags
=== RUN   TestAccCodeBuildFleet_baseCapacity
=== PAUSE TestAccCodeBuildFleet_baseCapacity
=== RUN   TestAccCodeBuildFleet_computeConfiguration
=== PAUSE TestAccCodeBuildFleet_computeConfiguration
=== RUN   TestAccCodeBuildFleet_computeType
=== PAUSE TestAccCodeBuildFleet_computeType
=== RUN   TestAccCodeBuildFleet_environmentType
=== PAUSE TestAccCodeBuildFleet_environmentType
=== RUN   TestAccCodeBuildFleet_imageId
=== PAUSE TestAccCodeBuildFleet_imageId
=== RUN   TestAccCodeBuildFleet_scalingConfiguration
=== PAUSE TestAccCodeBuildFleet_scalingConfiguration
=== RUN   TestAccCodeBuildFleet_vpcConfig
=== PAUSE TestAccCodeBuildFleet_vpcConfig
=== RUN   TestAccCodeBuildFleet_customInstanceType
=== PAUSE TestAccCodeBuildFleet_customInstanceType
=== CONT  TestAccCodeBuildFleet_Identity_Basic
=== CONT  TestAccCodeBuildFleet_computeConfiguration
=== CONT  TestAccCodeBuildFleet_disappears
=== CONT  TestAccCodeBuildFleet_Identity_ExistingResource
=== CONT  TestAccCodeBuildFleet_basic
=== CONT  TestAccCodeBuildFleet_baseCapacity
=== CONT  TestAccCodeBuildFleet_tags
=== CONT  TestAccCodeBuildFleet_Identity_RegionOverride
=== CONT  TestAccCodeBuildFleet_scalingConfiguration
=== CONT  TestAccCodeBuildFleet_customInstanceType
=== CONT  TestAccCodeBuildFleet_vpcConfig
=== CONT  TestAccCodeBuildFleet_environmentType
=== CONT  TestAccCodeBuildFleet_imageId
=== CONT  TestAccCodeBuildFleet_computeType
--- PASS: TestAccCodeBuildFleet_basic (72.85s)
--- PASS: TestAccCodeBuildFleet_imageId (74.17s)
--- PASS: TestAccCodeBuildFleet_Identity_Basic (83.46s)
--- PASS: TestAccCodeBuildFleet_Identity_RegionOverride (93.28s)
--- PASS: TestAccCodeBuildFleet_disappears (93.44s)
--- PASS: TestAccCodeBuildFleet_baseCapacity (99.45s)
--- PASS: TestAccCodeBuildFleet_computeType (99.45s)
--- PASS: TestAccCodeBuildFleet_customInstanceType (99.68s)
--- PASS: TestAccCodeBuildFleet_computeConfiguration (114.58s)
--- PASS: TestAccCodeBuildFleet_environmentType (117.57s)
--- PASS: TestAccCodeBuildFleet_tags (135.14s)
--- PASS: TestAccCodeBuildFleet_vpcConfig (138.59s)
--- PASS: TestAccCodeBuildFleet_scalingConfiguration (141.31s)
--- PASS: TestAccCodeBuildFleet_Identity_ExistingResource (149.62s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/codebuild  153.771s
$ make testacc TESTS=TestAccCodeBuildFleetDataSource_ PKG=codebuild               
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.24.5 test ./internal/service/codebuild/... -v -count 1 -parallel 20 -run='TestAccCodeBuildFleetDataSource_'  -timeout 360m -vet=off
2025/07/19 00:36:00 Creating Terraform AWS Provider (SDKv2-style)...
2025/07/19 00:36:00 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccCodeBuildFleetDataSource_basic
=== PAUSE TestAccCodeBuildFleetDataSource_basic
=== RUN   TestAccCodeBuildFleetDataSource_customInstanceType
=== PAUSE TestAccCodeBuildFleetDataSource_customInstanceType
=== CONT  TestAccCodeBuildFleetDataSource_basic
=== CONT  TestAccCodeBuildFleetDataSource_customInstanceType
--- PASS: TestAccCodeBuildFleetDataSource_basic (49.41s)
--- PASS: TestAccCodeBuildFleetDataSource_customInstanceType (49.72s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/codebuild  53.347s

Copy link
Contributor

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/codebuild Issues and PRs that pertain to the codebuild service. size/M Managed by automation to categorize the size of a PR. labels Jul 18, 2025
@tabito-hara tabito-hara force-pushed the f-aws_codebuild_fleet-add_instance_type branch from 5e4ed11 to 8711b4e Compare July 18, 2025 16:37
@tabito-hara tabito-hara marked this pull request as ready for review July 18, 2025 17:32
@tabito-hara tabito-hara requested a review from a team as a code owner July 18, 2025 17:32
@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Jul 29, 2025
@ewbankkit ewbankkit self-assigned this Jul 29, 2025
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jul 29, 2025
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=TestAccCodeBuildFleet' PKG=codebuild ACCTEST_PARALLELISM=3      
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.24.5 test ./internal/service/codebuild/... -v -count 1 -parallel 3  -run=TestAccCodeBuildFleet -timeout 360m -vet=off
2025/07/29 16:55:06 Creating Terraform AWS Provider (SDKv2-style)...
2025/07/29 16:55:06 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccCodeBuildFleetDataSource_basic
=== PAUSE TestAccCodeBuildFleetDataSource_basic
=== RUN   TestAccCodeBuildFleetDataSource_customInstanceType
=== PAUSE TestAccCodeBuildFleetDataSource_customInstanceType
=== RUN   TestAccCodeBuildFleet_Identity_Basic
=== PAUSE TestAccCodeBuildFleet_Identity_Basic
=== RUN   TestAccCodeBuildFleet_Identity_RegionOverride
=== PAUSE TestAccCodeBuildFleet_Identity_RegionOverride
=== RUN   TestAccCodeBuildFleet_Identity_ExistingResource
=== PAUSE TestAccCodeBuildFleet_Identity_ExistingResource
=== RUN   TestAccCodeBuildFleet_basic
=== PAUSE TestAccCodeBuildFleet_basic
=== RUN   TestAccCodeBuildFleet_disappears
=== PAUSE TestAccCodeBuildFleet_disappears
=== RUN   TestAccCodeBuildFleet_tags
=== PAUSE TestAccCodeBuildFleet_tags
=== RUN   TestAccCodeBuildFleet_baseCapacity
=== PAUSE TestAccCodeBuildFleet_baseCapacity
=== RUN   TestAccCodeBuildFleet_computeConfiguration
=== PAUSE TestAccCodeBuildFleet_computeConfiguration
=== RUN   TestAccCodeBuildFleet_computeType
=== PAUSE TestAccCodeBuildFleet_computeType
=== RUN   TestAccCodeBuildFleet_environmentType
=== PAUSE TestAccCodeBuildFleet_environmentType
=== RUN   TestAccCodeBuildFleet_imageId
=== PAUSE TestAccCodeBuildFleet_imageId
=== RUN   TestAccCodeBuildFleet_scalingConfiguration
=== PAUSE TestAccCodeBuildFleet_scalingConfiguration
=== RUN   TestAccCodeBuildFleet_vpcConfig
=== PAUSE TestAccCodeBuildFleet_vpcConfig
=== RUN   TestAccCodeBuildFleet_customInstanceType
=== PAUSE TestAccCodeBuildFleet_customInstanceType
=== CONT  TestAccCodeBuildFleetDataSource_basic
=== CONT  TestAccCodeBuildFleet_baseCapacity
=== CONT  TestAccCodeBuildFleet_Identity_ExistingResource
--- PASS: TestAccCodeBuildFleetDataSource_basic (42.99s)
=== CONT  TestAccCodeBuildFleet_tags
--- PASS: TestAccCodeBuildFleet_baseCapacity (66.02s)
=== CONT  TestAccCodeBuildFleet_disappears
=== CONT  TestAccCodeBuildFleet_basic
--- PASS: TestAccCodeBuildFleet_Identity_ExistingResource (111.52s)
--- PASS: TestAccCodeBuildFleet_disappears (56.89s)
=== CONT  TestAccCodeBuildFleet_Identity_Basic
--- PASS: TestAccCodeBuildFleet_tags (87.86s)
=== CONT  TestAccCodeBuildFleet_Identity_RegionOverride
--- PASS: TestAccCodeBuildFleet_basic (43.65s)
=== CONT  TestAccCodeBuildFleet_imageId
--- PASS: TestAccCodeBuildFleet_Identity_Basic (50.78s)
=== CONT  TestAccCodeBuildFleet_customInstanceType
--- PASS: TestAccCodeBuildFleet_Identity_RegionOverride (54.38s)
=== CONT  TestAccCodeBuildFleet_vpcConfig
--- PASS: TestAccCodeBuildFleet_imageId (43.75s)
=== CONT  TestAccCodeBuildFleet_scalingConfiguration
--- PASS: TestAccCodeBuildFleet_customInstanceType (66.84s)
=== CONT  TestAccCodeBuildFleetDataSource_customInstanceType
--- PASS: TestAccCodeBuildFleetDataSource_customInstanceType (41.48s)
=== CONT  TestAccCodeBuildFleet_computeType
--- PASS: TestAccCodeBuildFleet_scalingConfiguration (90.54s)
=== CONT  TestAccCodeBuildFleet_environmentType
--- PASS: TestAccCodeBuildFleet_vpcConfig (125.14s)
=== CONT  TestAccCodeBuildFleet_computeConfiguration
--- PASS: TestAccCodeBuildFleet_computeType (64.81s)
--- PASS: TestAccCodeBuildFleet_environmentType (64.36s)
--- PASS: TestAccCodeBuildFleet_computeConfiguration (66.91s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/codebuild	382.400s

@ewbankkit
Copy link
Contributor

@tabito-hara Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 72b875c into hashicorp:main Jul 29, 2025
52 checks passed
Copy link
Contributor

Warning

This Issue has been closed, meaning that any additional comments are much easier for the maintainers to miss. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v6.7.0 milestone Jul 29, 2025
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Aug 1, 2025
Copy link
Contributor

github-actions bot commented Aug 1, 2025

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

Copy link
Contributor

github-actions bot commented Sep 1, 2025

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 Sep 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/codebuild Issues and PRs that pertain to the codebuild 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.

aws_codebuild_fleet computeType=CUSTOM_INSTANCE_TYPE is missing required computeConfiguration.instanceType property
3 participants