Skip to content

Commit d7ab2f0

Browse files
committed
feat(codebuild): add custom instance type and VPC to Fleets
https://aws.amazon.com/about-aws/whats-new/2025/04/aws-codebuild-ec2-instance-type-configurable-storage-size/ CodeBuild now supports specifying specific EC2 instance types to serve as fleet compute. Add this support to the Fleet construct by way of adding CUSTOM_INSTANCE_TYPE to the FleetComputeType enum, and `instanceType` to `ComputeConfiguration`. Also, add VPC support to Fleet. This mirrors the VPC support in Project. When using Fleets, the VPC configured on the Project does nothing. Only the VPC on the Fleet applies. This required adding a Role to the Fleet to handle provisioning EC2 network interfaces in the configured VPC.
1 parent d8e6c09 commit d7ab2f0

File tree

57 files changed

+63697
-23751
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+63697
-23751
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-codebuild/test/integ.project-fleet-attribute-based-compute.js.snapshot/AttributeBasedComputeFleetIntegStack0.assets.json

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-codebuild/test/integ.project-fleet-attribute-based-compute.js.snapshot/AttributeBasedComputeFleetIntegStack0.template.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,14 @@
150150
"EncryptionKey": "alias/aws/s3",
151151
"Environment": {
152152
"ComputeType": "BUILD_GENERAL1_SMALL",
153+
"Fleet": {
154+
"FleetArn": {
155+
"Fn::GetAtt": [
156+
"MyFleet1E628396",
157+
"Arn"
158+
]
159+
}
160+
},
153161
"Image": "aws/codebuild/standard:7.0",
154162
"ImagePullCredentialsType": "CODEBUILD",
155163
"PrivilegedMode": false,

packages/@aws-cdk-testing/framework-integ/test/aws-codebuild/test/integ.project-fleet-attribute-based-compute.js.snapshot/AttributeBasedComputeFleetIntegStack1.assets.json

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-codebuild/test/integ.project-fleet-attribute-based-compute.js.snapshot/AttributeBasedComputeFleetIntegStack1.template.json

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,14 @@
150150
"EncryptionKey": "alias/aws/s3",
151151
"Environment": {
152152
"ComputeType": "BUILD_GENERAL1_SMALL",
153+
"Fleet": {
154+
"FleetArn": {
155+
"Fn::GetAtt": [
156+
"MyFleet1E628396",
157+
"Arn"
158+
]
159+
}
160+
},
153161
"Image": "aws/codebuild/standard:7.0",
154162
"ImagePullCredentialsType": "CODEBUILD",
155163
"PrivilegedMode": false,
@@ -169,17 +177,6 @@
169177
}
170178
},
171179
"Outputs": {
172-
"ExportsOutputFnGetAttMyFleet1E628396Arn64216BDA": {
173-
"Value": {
174-
"Fn::GetAtt": [
175-
"MyFleet1E628396",
176-
"Arn"
177-
]
178-
},
179-
"Export": {
180-
"Name": "AttributeBasedComputeFleetIntegStack1:ExportsOutputFnGetAttMyFleet1E628396Arn64216BDA"
181-
}
182-
},
183180
"ExportsOutputRefMyProject39F7B0AE1CE3CA42": {
184181
"Value": {
185182
"Ref": "MyProject39F7B0AE"

packages/@aws-cdk-testing/framework-integ/test/aws-codebuild/test/integ.project-fleet-attribute-based-compute.js.snapshot/AttributeBasedComputeFleetIntegStack2.assets.json

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)