Skip to content

Commit

Permalink
feat: set subnet type
Browse files Browse the repository at this point in the history
  • Loading branch information
Unerty committed Oct 28, 2021
1 parent 09da772 commit b980961
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/cdk-gitlab-runner-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import {
Port,
Protocol,
SecurityGroup,
SubnetSelection,
SubnetType,
Vpc,
} from "@aws-cdk/aws-ec2";
import {
Expand All @@ -34,7 +36,7 @@ export interface GitlabRunnerStackProps extends StackProps {
cacheBucketName: string;
cacheExpirationInDays: number;
availabilityZone: any; // TODO: Provide some type
subnetId: any; // TODO: Provide some type
vpcSubnet: SubnetSelection;
managerImageId: any; // TODO: Provide some type
managerInstanceType: any; // TODO: Provide some type
managerKeyPair: any; // TODO: Provide some type
Expand Down Expand Up @@ -135,7 +137,9 @@ export class GitlabRunnerStack extends Stack {
// keyName: props.managerKeyPair, // TODO: set type in props
// IamInstanceProfile: // TODO: set this
securityGroup: managerSecurityGroup,
// SubnetId: // TODO: maybe remove because we already have vpc
vpcSubnets: props.vpcSubnet ?? {
subnetType: SubnetType.PUBLIC,
},
});
manager.node.tryRemoveChild("InstanceProfile"); // Remove default InstanceProfile
manager.instance.iamInstanceProfile =
Expand Down

0 comments on commit b980961

Please sign in to comment.