Skip to content

Use the security group provided in the custom resource config #65

@MarcioMeier

Description

@MarcioMeier

Problem being solved

Currently the WSO2 custom resources creates a new security group when a network config is provided.

If the security groups is provided in the props, it is never added to the lambda, if it is not provided a new security group is created and added to the lambda

reference:

// Create security group for custom resource if VPC is defined and no security group is defined
if (args.props.customResourceConfig?.network) {
vpc = vpcFromConfig(args.scope, args.props.customResourceConfig.network);
if (
!customResourceConfig?.securityGroups ||
customResourceConfig?.securityGroups.length === 0
) {
// create default security group for the lambda function
const securityGroup = new SecurityGroup(args.scope, `sg-cr-${args.scope.node.id}`, {
vpc,
description: `Security group for WSO2 CustomResource ${args.scope.node.id}`,
allowAllOutbound: true,
});
securityGroups.push(securityGroup);
}
}

Proposal

Start using the security groups provided in the customResourceConfig property in WSO2 custom resources.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions