Skip to content

Commit dc52dcd

Browse files
committed
feat: adds sns topic
1 parent 6513261 commit dc52dcd

4 files changed

Lines changed: 288 additions & 378 deletions

File tree

__tests__/modules/base.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ describe("Modules Base", () => {
99
folderList = readdirSync('./base')
1010
});
1111

12-
it("should should have 19 files", () => {
13-
expect(folderList.length).toEqual(19);
12+
it("should should have 20 files", () => {
13+
expect(folderList.length).toEqual(20);
1414
});
1515

1616
it("should should have the exact files", () => {
@@ -30,6 +30,7 @@ describe("Modules Base", () => {
3030
'RDS.ts',
3131
'Route53.ts',
3232
'S3Bucket.ts',
33+
'SNS.ts',
3334
'SQS.ts',
3435
'SSM.ts',
3536
'VPC.ts',

base/SNS.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { SnsTopic as aws_SnsTopic, SnsTopicConfig } from '@cdktf/provider-aws/lib/sns-topic';
2+
import { Construct } from 'constructs';
3+
4+
export class SnsTopic extends aws_SnsTopic {
5+
constructor(scope: Construct, id: string, config: SnsTopicConfig) {
6+
super(scope, `asm/${id}`, config);
7+
}
8+
};

main.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import {
3838
DynamodbTableItem
3939
} from "./base/Dynamodb";
4040
import { DbInstance } from "./base/RDS";
41+
import { SnsTopic } from "./base/SNS";
4142
import { SqsQueue } from "./base/SQS";
4243
import { SsmParameter } from "./base/SSM";
4344
import {
@@ -220,6 +221,9 @@ export {
220221
// RDS
221222
DbInstance,
222223

224+
// SNS
225+
SnsTopic,
226+
223227
// SQS
224228
SqsQueue,
225229

0 commit comments

Comments
 (0)