-
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
rd/aws_codebuild_fleet: new resource and data source #39237
Conversation
Community NoteVoting for Prioritization
For Submitters
|
internal/service/codebuild/fleet.go
Outdated
if err := waitFleetDeleted(ctx, conn, d.Id()); err != nil { | ||
return create.AppendDiagError(diags, names.CodeBuild, create.ErrActionWaitingForDeletion, ResNameFleet, d.Id(), err) | ||
} |
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.
Fleets can stay in the "pending deletion" state even for a few hours. Not sure what would be the best way to handle such cases (e.g. allow optionally skipping the wait?).
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.
Can fleets be "undeleted"? I not we may just want to treat "pending deletion" as deleted
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.
Apparently it cannot. When I try to perform any action on a fleet "pending deletion", I get the following error:
Fleet status is PENDING_DELETION_SUBMITTED. Cannot be updated.
Therefore, I'll remove the waiter.
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.
@ewbankkit Done ✅
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.
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.22.6 test ./internal/service/codebuild/... -v -count 1 -parallel 3 -run=TestAccCodeBuildFleet_ -timeout 360m
=== 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_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_environmentType
=== CONT TestAccCodeBuildFleet_baseCapacity
--- PASS: TestAccCodeBuildFleet_basic (44.74s)
=== CONT TestAccCodeBuildFleet_tags
--- PASS: TestAccCodeBuildFleet_baseCapacity (65.94s)
=== CONT TestAccCodeBuildFleet_scalingConfiguration
--- PASS: TestAccCodeBuildFleet_environmentType (66.53s)
=== CONT TestAccCodeBuildFleet_vpcConfig
--- PASS: TestAccCodeBuildFleet_scalingConfiguration (64.53s)
=== CONT TestAccCodeBuildFleet_imageId
--- PASS: TestAccCodeBuildFleet_tags (87.98s)
=== CONT TestAccCodeBuildFleet_disappears
--- PASS: TestAccCodeBuildFleet_imageId (43.81s)
=== CONT TestAccCodeBuildFleet_computeType
--- PASS: TestAccCodeBuildFleet_disappears (57.04s)
--- PASS: TestAccCodeBuildFleet_computeType (65.17s)
--- PASS: TestAccCodeBuildFleet_vpcConfig (229.07s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/codebuild 300.692s
% make testacc TESTARGS='-run=TestAccCodeBuildFleetDataSource_' PKG=codebuild ACCTEST_PARALLELISM=3
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.6 test ./internal/service/codebuild/... -v -count 1 -parallel 3 -run=TestAccCodeBuildFleetDataSource_ -timeout 360m
=== RUN TestAccCodeBuildFleetDataSource_basic
=== PAUSE TestAccCodeBuildFleetDataSource_basic
=== CONT TestAccCodeBuildFleetDataSource_basic
--- PASS: TestAccCodeBuildFleetDataSource_basic (42.14s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/codebuild 46.938s
% make testacc TESTARGS='-run=TestAccCodeBuildProject_fleet\|TestAccCodeBuildProject_basic' PKG=codebuild
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.6 test ./internal/service/codebuild/... -v -count 1 -parallel 20 -run=TestAccCodeBuildProject_fleet\|TestAccCodeBuildProject_basic -timeout 360m
=== RUN TestAccCodeBuildProject_basic
=== PAUSE TestAccCodeBuildProject_basic
=== RUN TestAccCodeBuildProject_fleet
=== PAUSE TestAccCodeBuildProject_fleet
=== CONT TestAccCodeBuildProject_basic
=== CONT TestAccCodeBuildProject_fleet
--- PASS: TestAccCodeBuildProject_basic (21.92s)
--- PASS: TestAccCodeBuildProject_fleet (42.70s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/codebuild 47.531s
@kamilturek Thanks for the contribution 🎉 👏. |
This functionality has been released in v5.67.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. |
Description
This PR introduces
aws_codebuild_fleet
resource and data source.Relations
Closes #36010.
Extends #36790 (credits to @alexknez).
References
https://docs.aws.amazon.com/codebuild/latest/APIReference/API_CreateFleet.html
Output from Acceptance Testing