You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(codebuild): improve the doc for subnetSelection (#26592)
If `vpc` is specified with `subnetSelection` undefined, according to this:
https://github.com/aws/aws-cdk/blob/d5c64cba9aa8af8e92af4893657d144ef8e4f873/packages/aws-cdk-lib/aws-ec2/lib/vpc.ts#L655-L660
CDK will look for `PRIVATE_WITH_EGRESS`, `PRIVATE_ISOLATED`, and `PUBLIC` in order. If customer does not have `PRIVATE_WITH_EGRESS` subnets, they will need to have vpc endpoints if they need to access AWS services such as AWS Secrets Manager or Amazon ECR.
This PR improves the doc to clarify.
Closes #<issue number here>.
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
* Where to place the network interfaces within the VPC.
618
618
*
619
-
* Only used if 'vpc' is supplied.
619
+
* To access AWS services, your CodeBuild project needs to be in one of the following types of subnets:
620
+
*
621
+
* 1. Subnets with access to the internet (of type PRIVATE_WITH_EGRESS).
622
+
* 2. Private subnets unconnected to the internet, but with [VPC endpoints](https://docs.aws.amazon.com/codebuild/latest/userguide/use-vpc-endpoints-with-codebuild.html) for the necessary services.
623
+
*
624
+
* If you don't specify a subnet selection, the default behavior is to use PRIVATE_WITH_EGRESS subnets first if they exist,
625
+
* then PRIVATE_WITHOUT_EGRESS, and finally PUBLIC subnets. If your VPC doesn't have PRIVATE_WITH_EGRESS subnets but you need
626
+
* AWS service access, add VPC Endpoints to your private subnets.
627
+
*
628
+
* @see https://docs.aws.amazon.com/codebuild/latest/userguide/vpc-support.html for more details.
620
629
*
621
-
* @default - All private subnets.
630
+
* @default - private subnets if available else public subnets
0 commit comments