https://github.com/pepperize/cdk-security-group
This project provides a CDK construct to create an EC2 SecurityGroup, which property `securityGroupName` returns the GroupName.
https://github.com/pepperize/cdk-security-group
aws cdk ec2 security-group
Last synced: 11 months ago
JSON representation
This project provides a CDK construct to create an EC2 SecurityGroup, which property `securityGroupName` returns the GroupName.
- Host: GitHub
- URL: https://github.com/pepperize/cdk-security-group
- Owner: pepperize
- License: mit
- Created: 2022-01-17T19:12:38.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-06-17T14:46:00.000Z (12 months ago)
- Last Synced: 2025-06-17T15:41:56.807Z (12 months ago)
- Topics: aws, cdk, ec2, security-group
- Language: TypeScript
- Homepage:
- Size: 2.72 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://makeapullrequest.com)
[](https://github.com/pepperize/cdk-security-group/blob/main/LICENSE)
[](https://www.npmjs.com/package/@pepperize/cdk-security-group)
[](https://pypi.org/project/pepperize.cdk-security-group/)
[](https://www.nuget.org/packages/Pepperize.CDK.SecurityGroup/)
[](https://s01.oss.sonatype.org/content/repositories/releases/com/pepperize/cdk-security-group/)
[](https://github.com/pepperize/cdk-security-group/actions/workflows/release.yml)
[](https://github.com/pepperize/cdk-security-group/releases)
# AWS CDK SecurityGroup
This project provides a CDK construct to create an EC2 SecurityGroup, which property `securityGroupName` returns the
GroupName.
> The [CDK EC2 SecurityGroup](https://docs.aws.amazon.com/cdk/api/v1/docs/@aws-cdk_aws-ec2.SecurityGroup.html)
> returns the GroupId from the `Ref` return value of [AWS::EC2::SecurityGroup](https://docs.aws.amazon.com/de_de/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-security-group.html),
> rather than the GroupName.
## Install
### TypeScript
```shell
npm install @pepperize/cdk-security-group
```
or
```shell
yarn add @pepperize/cdk-security-group
```
### Python
```shell
pip install pepperize.cdk-security-group
```
### C# / .Net
```
dotnet add package Pepperize.CDK.SecurityGroup
```
### Java
```xml
com.pepperize
cdk-security-group
${cdkSecurityGroup.version}
```
## Example
```shell
npm install @pepperize/cdk-security-group
```
See [API.md](https://github.com/pepperize/cdk-security-group/blob/main/API.md).
```typescript
import { SecurityGroup } from "@pepperize/cdk-security-group";
const securityGroup = new SecurityGroup(this, "SecurityGroup", {});
// Pass to another construct
new OtherConstruct(this, OtherConstruct, {
SecurityGroupName: securityGroup.securityGroupName,
});
```