AWS CDK SecurityGroup
This project provides a CDK construct to create an EC2 SecurityGroup, which property securityGroupName
returns the
GroupName.
The CDK EC2 SecurityGroup
returns the GroupId from the Ref
return value of AWS::EC2::SecurityGroup,
rather than the GroupName.
Install
TypeScript
npm install @pepperize/cdk-security-group
or
yarn add @pepperize/cdk-security-group
Python
pip install pepperize.cdk-security-group
C# / .Net
dotnet add package Pepperize.CDK.SecurityGroup
Example
npm install @pepperize/cdk-security-group
See API.md.
import { SecurityGroup } from "@pepperize/cdk-security-group";
const securityGroup = new SecurityGroup(this, "SecurityGroup", {});
new OtherConstruct(this, OtherConstruct, {
SecurityGroupName: securityGroup.securityGroupName,
});