codebuild: Fleet L2 construct missing imageId property
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the feature
The L2 [Fleet](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.Fleet.html) construct doesn't expose any properties to let you set the Image for the fleet, like the L1 [CfnFleet](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.CfnFleet.html#imageid) provides. Which seemingly makes it impossible to set the OS version for it while using this construct.
### Use Case
We have a macOS build fleet which defaults to using the macOS 14 AMI, but when trying to upgrade to the 26 AMI couldn't find any way to specify the image for the instances to run while using this construct. Had to resort to dropping out to the L1 construct and then manually specifying the ImageId to get it to work.
```
const l1MacFleet = l2MacFleet.node.defaultChild as CfnFleet;
l1MacFleet.imageId = MacBuildImage.BASE_26.imageId;
```
### Proposed Solution
_No response_
### Other Information
_No response_
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### AWS CDK Library version (aws-cdk-lib)
2.245.0
### AWS CDK CLI version
2.1025.0
### Environment details (OS name and version, etc.)
macOS
Contributor guide
Research direction
Start with the aws_codebuild.Fleet L2 construct and the aws_codebuild.CfnFleet L1 API documentation, especially the existing imageId property. Trace how Fleet properties are translated to CfnFleet, expose an equivalent image setting, and verify that a synthesized fleet contains the requested image ID.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 66/100