feat: Ec2Runner VPC selection
See original GitHub issueI just tried out to use the EC2 runners. Within our accounts we do not have a default VPC which leads to the stack can not be deployed.
const ec2Provider = new Ec2Runner(this, "ec2Runner", {
subnet: subnets[0],
spot: true,
})
10:28:42 AM | CREATE_FAILED | AWS::ImageBuilder::Image | Dev/GitHubRunners/...mage Builder/Image
Resource handler returned message: "Error occurred during operation 'No default VPC for this user. GroupName is only supported for EC2-Classic and default VPC.'." (RequestToken: ...., Handle
rErrorCode: GeneralServiceException)
Currently the Ec2RunnerProps also do not provide the option to set a VPC.
https://github.com/CloudSnorkel/cdk-github-runners/blob/main/src/providers/ec2.ts#L126-L186
Issue Analytics
- State:
- Created 10 months ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Work with VPCs - Amazon Virtual Private Cloud
Select Dedicated to ensure that EC2 instances launched in this VPC are run on dedicated tenancy instances regardless of the tenancy attribute specified...
Read more >feat(ecs-patterns): allow to select vpc subnets for LB fargate ...
feat (ecs-patterns): allow to select vpc subnets for LB fargate service · The logs for this run have expired and are no longer...
Read more >How to Build a VPC in AWS - AWS in Plain English
In the AWS console, choose VPCs, Select Create VPC. Give it a name example “Yourname-VPC” and enter a CIDR block range example 10.0.0.0/16....
Read more >kichik - PullAnswer
feat : Ec2Runner VPC selection. 1 Likes 5 Replies. fwerkmeister. 2022-11-30. feat: Ec2Runner VPC selection. 1 Likes 5 Replies. fwerkmeister. 2022-11-30 ...
Read more >Selecting the Best VPC Network Architecture (CPN208)
Which is better: a single VPC with multiple subnets or multiple accounts with many VPCs? Should you simplify management with a single VPC...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
After doing some more analysis it looks like the problem is related to the AmiBuilder where subnet and vpc would need to be passed into as properties if set.
https://github.com/CloudSnorkel/cdk-github-runners/blob/2aae0e6286cda81fb809aa3e02287767e29a6d28/src/providers/ec2.ts#L233
https://github.com/CloudSnorkel/cdk-github-runners/blob/main/src/providers/image-builders/ami.ts#L55-L74
I’ll create a PR. No need for a new issue.
BTW, I appreciate the bug reports, but you know you can pass your own image builder to get unblocked, right?