Skip to content

Commit

Permalink
fix: lookup default sg when using existing vpc
Browse files Browse the repository at this point in the history
  • Loading branch information
zxkane authored and bigadsoleiman committed Jun 13, 2024
1 parent 7a75d45 commit 1418b5c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/model-interfaces/idefics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ export class IdeficsInterface extends Construct {
// in order to avoid using signed URLs and run out of input tokens
// with the idefics model
const defaultSecurityGroup = (props.config.vpc?.vpcId && props.config.vpc.vpcDefaultSecurityGroup) ?
props.config.vpc.vpcDefaultSecurityGroup : props.shared.vpc.vpcDefaultSecurityGroup
props.config.vpc.vpcDefaultSecurityGroup : props.shared.vpc.vpcDefaultSecurityGroup;

const vpcDefaultSecurityGroup = ec2.SecurityGroup.fromSecurityGroupId(
const vpcDefaultSecurityGroup = defaultSecurityGroup ? ec2.SecurityGroup.fromSecurityGroupId(
this,
'VPCDefaultSecurityGroup',
defaultSecurityGroup
);
) : ec2.SecurityGroup.fromLookupByName(this, 'VPCDefaultSecurityGroup', 'default', props.shared.vpc);

const vpcEndpoint = props.shared.vpc.addInterfaceEndpoint(
"PrivateApiEndpoint",
Expand Down

0 comments on commit 1418b5c

Please sign in to comment.