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

r/aws_codebuild_fleet: Allow scaling_configuration to be removed on Update #40773

Conversation

kamilturek
Copy link
Collaborator

@kamilturek kamilturek commented Jan 4, 2025

Description

This PR fixes removing the scaling_configuration block argument on update. An empty ScalingConfigurationInput struct needs to be passed to the UpdateFleet action in order to actually remove the scaling configuration.

Relations

Closes #40345.

References

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

Output from Acceptance Testing

% make testacc PKG=codebuild ACCTEST_PARALLELISM=1 TESTARGS="-run=TestAccCodeBuildFleet_scalingConfiguration"
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/codebuild/... -v -count 1 -parallel 1  -run=TestAccCodeBuildFleet_scalingConfiguration -timeout 360m
2025/01/04 13:59:36 Initializing Terraform AWS Provider...
=== RUN   TestAccCodeBuildFleet_scalingConfiguration
=== PAUSE TestAccCodeBuildFleet_scalingConfiguration
=== CONT  TestAccCodeBuildFleet_scalingConfiguration
--- PASS: TestAccCodeBuildFleet_scalingConfiguration (103.13s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/codebuild  108.212s

Copy link

github-actions bot commented Jan 4, 2025

Community Note

Voting for Prioritization

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

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • 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 tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/codebuild Issues and PRs that pertain to the codebuild service. needs-triage Waiting for first response or review from a maintainer. external-maintainer Contribution from a trusted external contributor. labels Jan 4, 2025
@kamilturek kamilturek changed the title r/aws_codebuild_fleet: Fix removing scaling configuration r/aws_codebuild_fleet: Allow scaling_configuration to be removed on Update Jan 4, 2025
@kamilturek kamilturek marked this pull request as ready for review January 7, 2025 17:03
@kamilturek kamilturek requested a review from a team as a code owner January 7, 2025 17:03
@jar-b jar-b removed the needs-triage Waiting for first response or review from a maintainer. label Jan 7, 2025
@ewbankkit ewbankkit self-assigned this Jan 7, 2025
@ewbankkit ewbankkit added the bug Addresses a defect in current functionality. label Jan 7, 2025
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jan 7, 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.23.3 test ./internal/service/codebuild/... -v -count 1 -parallel 3  -run=TestAccCodeBuildFleet_ -timeout 360m
2025/01/07 15:47:49 Initializing Terraform AWS Provider...
=== 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
=== CONT  TestAccCodeBuildFleet_basic
=== CONT  TestAccCodeBuildFleet_computeType
=== CONT  TestAccCodeBuildFleet_scalingConfiguration
--- PASS: TestAccCodeBuildFleet_basic (44.08s)
=== CONT  TestAccCodeBuildFleet_vpcConfig
--- PASS: TestAccCodeBuildFleet_computeType (64.88s)
=== CONT  TestAccCodeBuildFleet_baseCapacity
--- PASS: TestAccCodeBuildFleet_scalingConfiguration (90.06s)
=== CONT  TestAccCodeBuildFleet_computeConfiguration
--- PASS: TestAccCodeBuildFleet_vpcConfig (81.96s)
=== CONT  TestAccCodeBuildFleet_tags
--- PASS: TestAccCodeBuildFleet_baseCapacity (63.24s)
=== CONT  TestAccCodeBuildFleet_environmentType
--- PASS: TestAccCodeBuildFleet_computeConfiguration (65.88s)
=== CONT  TestAccCodeBuildFleet_disappears
--- PASS: TestAccCodeBuildFleet_environmentType (63.36s)
=== CONT  TestAccCodeBuildFleet_imageId
--- PASS: TestAccCodeBuildFleet_disappears (56.13s)
--- PASS: TestAccCodeBuildFleet_tags (86.45s)
--- PASS: TestAccCodeBuildFleet_imageId (44.16s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/codebuild	240.975s

@ewbankkit
Copy link
Contributor

@kamilturek Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 4cd35f2 into hashicorp:main Jan 7, 2025
54 checks passed
@github-actions github-actions bot added this to the v5.83.0 milestone Jan 7, 2025
@kamilturek kamilturek deleted the b-aws-codebuild-fleet-scaling-configuration-delete branch January 7, 2025 21:19
Copy link

github-actions bot commented Jan 9, 2025

This functionality has been released in v5.83.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 github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. external-maintainer Contribution from a trusted external contributor. service/codebuild Issues and PRs that pertain to the codebuild service. 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.

[Bug]: Unable to remove scaling_configuration from existing aws_codebuild_fleet resource
3 participants